terraform-aws-billing-export

Terraform Module witch creates billing export, including FOCUS, on AWS.

https://github.com/iamfrench/terraform-aws-billing-export

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.7%) to scientific vocabulary

Keywords

aws aws-billing aws-cur finops finops-focus focus terraform terraform-modules
Last synced: 6 months ago · JSON representation ·

Repository

Terraform Module witch creates billing export, including FOCUS, on AWS.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 5
Topics
aws aws-billing aws-cur finops finops-focus focus terraform terraform-modules
Created almost 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

Amazon Web Services (AWS) Billing export Terraform Module

Terraform module witch creates billing export on AWS.

FOCUS v1.0 billing export for AWS now available!

This module will create S3 bucket for AWS billing exports.

What is FOCUS™?

The FinOps Cost and Usage Specification (FOCUS™) is an open-source specification that defines clear requirements for cloud vendors to produce consistent cost and usage datasets.

Supported by the FinOps Foundation, FOCUS™ aims to reduce complexity for FinOps Practitioners so they can drive data-driven decision-making and maximize the business value of cloud, while making their skills more transferable across clouds, tools, and organizations.

Learn more about FOCUS in this FinOps Foundation Insights article.

Usage

```terraform

FOCUS v1.0 AWS billing export with the creation of the S3 bucket

module "awsbillingexport" { source = "IAmFrench/billing-export/aws"

# Version of this module, see release on GitHub: https://github.com/IAmFrench/terraform-aws-billing-export/releases version = "1.0.4"

# Name of the S3 bucket to create exports in s3bucketname = "finops-exports-1a2b3c4d" # Type of the export exporttype = "FOCUS" # Version of the export exportversion = "1.0" # Name of the export exportname = "focus-v1-0-export" # Prefix of the export exports3_prefix = "focus/v1.0/1234556789" } ```

```terraform

FOCUS v1.0 AWS billing export with an existing S3 bucket

module "awsbillingexport" { source = "IAmFrench/billing-export/aws"

# Version of this module, see release on GitHub: https://github.com/IAmFrench/terraform-aws-billing-export/releases version = "1.0.4"

# Name of the S3 bucket to create exports in s3bucketname = data.awss3bucket.export.id # Should this module create the S3 bucket with associated policy? creates3bucket = false # Type of the export exporttype = "FOCUS" # Version of the export exportversion = "1.0" # Name of the export exportname = "focus-v1-0-export" # Prefix of the export exports3_prefix = "focus/v1.0/1234556789" } ```

Roadmap

Common errors

  • ValidationException: S3 bucket permission validation failed: The existing S3 bucket is missing the policy to allow AWS export services to write to the bucket, see https://docs.aws.amazon.com/cur/latest/userguide/dataexports-s3-bucket.html

Requirements

| Name | Version | |------|---------| | terraform | >= 1.1.0 | | aws | >= 5.47.0 |

Providers

| Name | Version | |------|---------| | aws | >= 5.47.0 |

Modules

No modules.

Resources

| Name | Type | |------|------| | awsbcmdataexportsexport.focus | resource | | awss3bucket.export | resource | | awss3bucketpolicy.allowdata_export | resource | | awscalleridentity.current | data source | | awsiampolicydocument.allowdata_export | data source | | awss3bucket.export | data source |

Inputs

| Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | create_s3_bucket | Option to create or not the S3 bucket for the billing export.
If set to false, this module will not create the S3 bucket.
Therefore please check that bucket policies are sets to allow AWS export services to write files in it.
More info: https://docs.aws.amazon.com/cur/latest/userguide/dataexports-s3-bucket.html

E.g.: true, false | bool | true | no | | export_name | Name of the billing export.
Validation: Export name must be unique, not include spaces, and contain only alphanumeric and characters ! - _ . * ' ( )
E.g.: focus-v1-0-preview | string | n/a | yes | | export_s3_prefix | Prefix of the billing export.
E.g.: focus/123456789 with 123456789 being the account id | string | "" | no | | export_type | Version of the billing export.
Valid values: FOCUS or CUR
E.g.: FOCUS or CUR | string | n/a | yes | | export_version | Version of the billing export. Should be use with export_type.
Valid values are:
- 1.0 and 1.0-preview for FOCUS
- legacy or 2.0 for CUR
E.g.: 1.0, 1.0-preview, legacy, 2.0 | string | n/a | yes | | s3_bucket_name | Name of the S3 bucket to be created
E.g.: finops-focus-export-a1b2c3d4 | string | n/a | yes | | tags | Tags to apply to all created resources.
E.g.:

{
createdBy = "Terraform"
}
| map(string) | {} | no |

Outputs

| Name | Description | |------|-------------| | export_arn | ARN of the export | | s3_arn | ARN of the export bucket | <!-- ENDTFDOCS -->

Owner

  • Name: Alexandre PARÈS
  • Login: IAmFrench
  • Kind: user
  • Location: Switzerland

FinOps Certified Professional | AWS Academy Certified Educator | FinOps Practitioner

Citation (CITATION.cff)

cff-version: 1.2.0
title: Amazon Web Services (AWS) Billing export Terraform Module
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - orcid: "https://orcid.org/0009-0002-1956-1126"
    given-names: Alexandre
    family-names: PARÈS
identifiers:
  - type: doi
    value: 10.5281/zenodo.12556267
repository-code: >-
  https://github.com/IAmFrench/terraform-aws-billing-export
repository-artifact: >-
  https://registry.terraform.io/modules/IAmFrench/billing-export/aws/latest
abstract: >-
  Terraform Module witch creates billing export, including FOCUS, on AWS. 
keywords:
  - terraform
  - terraform-modules
  - aws
  - aws-billing
  - aws-cur
  - aws-focus
  - finops
  - finops-focus
license: Apache-2.0

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Push event: 3
  • Fork event: 1
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 1
  • Push event: 3
  • Fork event: 1
  • Create event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 8
  • Total Committers: 1
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
IAmFrench I****h 8

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels