Skip to content

Commit

Permalink
Support SPLIT_COST_ALLOCATION_DATA in cur-report (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
posquit0 authored May 8, 2024
1 parent 6c60f89 commit 760b74a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions modules/cur-report/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ This module creates following resources.

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.30 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.43 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.19.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.48.0 |

## Modules

Expand All @@ -37,10 +37,10 @@ No modules.
| <a name="input_name"></a> [name](#input\_name) | (Required) The name of the report that you want to create. The name must be unique, is case sensitive, and can't include spaces. Limited to 256 characters. | `string` | n/a | yes |
| <a name="input_time_granularity"></a> [time\_granularity](#input\_time\_granularity) | (Required) The frequency on which report data are measured and displayed. Valid values are `HOURLY`, `DAILY`, `MONTHLY`. | `string` | n/a | yes |
| <a name="input_additional_artifacts"></a> [additional\_artifacts](#input\_additional\_artifacts) | (Optional) A set of additional artifacts. Valid values are `REDSHIFT`, `QUICKSIGHT`, `ATHENA`. When `ATHENA` exists within `additional_artifacts`, no other artifact type can be declared and `versioning_strategy` must be `OVERWRITE_REPORT`. | `set(string)` | `[]` | no |
| <a name="input_additional_schema_elements"></a> [additional\_schema\_elements](#input\_additional\_schema\_elements) | (Optional) A set of schema elements. Valid values are `RESOURCES`. | `set(string)` | `[]` | no |
| <a name="input_additional_schema_elements"></a> [additional\_schema\_elements](#input\_additional\_schema\_elements) | (Optional) A set of schema elements. Valid values are `RESOURCES`, `SPLIT_COST_ALLOCATION_DATA`. | `set(string)` | `[]` | no |
| <a name="input_compression_format"></a> [compression\_format](#input\_compression\_format) | (Optional) The compression format that AWS uses for the report. Valid values are `ZIP`, `GZIP`, `PARQUET`. | `string` | `"GZIP"` | no |
| <a name="input_data_refresh_enabled"></a> [data\_refresh\_enabled](#input\_data\_refresh\_enabled) | (Optional) Whether you want Amazon Web Services to update your reports after they have been finalized if Amazon Web Services detects charges related to previous months. These charges can include refunds, credits, or support fees. Defaults to `true`. | `bool` | `true` | no |
| <a name="input_versioning_strategy"></a> [versioning\_strategy](#input\_versioning\_strategy) | (Optional) Whether you want Amazon Web Services to overwrite the previous version of each report or to deliver the report in addition to the previous versions. Valid values are `CREATE_NEW_REPORT`, `OVERWRITE_REPORT`. | `string` | `"OVERWRITE_REPORT"` | no |
| <a name="input_versioning_strategy"></a> [versioning\_strategy](#input\_versioning\_strategy) | (Optional) Whether you want Amazon Web Services to overwrite the previous version of each report or to deliver the report in addition to the previous versions. Valid values are `CREATE_NEW_REPORT`, `OVERWRITE_REPORT`. Defaults to `OVERWRITE_REPORT`. | `string` | `"OVERWRITE_REPORT"` | no |

## Outputs

Expand Down
8 changes: 4 additions & 4 deletions modules/cur-report/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ variable "time_granularity" {
}

variable "versioning_strategy" {
description = "(Optional) Whether you want Amazon Web Services to overwrite the previous version of each report or to deliver the report in addition to the previous versions. Valid values are `CREATE_NEW_REPORT`, `OVERWRITE_REPORT`."
description = "(Optional) Whether you want Amazon Web Services to overwrite the previous version of each report or to deliver the report in addition to the previous versions. Valid values are `CREATE_NEW_REPORT`, `OVERWRITE_REPORT`. Defaults to `OVERWRITE_REPORT`."
type = string
default = "OVERWRITE_REPORT"
nullable = false
Expand Down Expand Up @@ -62,17 +62,17 @@ variable "compression_format" {
}

variable "additional_schema_elements" {
description = "(Optional) A set of schema elements. Valid values are `RESOURCES`."
description = "(Optional) A set of schema elements. Valid values are `RESOURCES`, `SPLIT_COST_ALLOCATION_DATA`."
type = set(string)
default = []
nullable = false

validation {
condition = alltrue([
for element in var.additional_schema_elements :
contains(["RESOURCES"], element)
contains(["RESOURCES", "SPLIT_COST_ALLOCATION_DATA"], element)
])
error_message = "Valid values for each value of `additional_schema_elements` are `RESOURCES`."
error_message = "Valid values for each value of `additional_schema_elements` are `RESOURCES`, `SPLIT_COST_ALLOCATION_DATA`."
}
}

Expand Down

0 comments on commit 760b74a

Please sign in to comment.