hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[Bug]: Cannot create cost category with cost allocation tag as dimension based on rule of type 'Regular' #40400

Open HansBraun opened 1 day ago

HansBraun commented 1 day ago

Terraform Core Version

1.9.8

AWS Provider Version

5.78.0

Affected Resource(s)

aws_ce_cost_category

Expected Behavior

Cost Category is created like it is when using the uiin the AWS console.

Actual Behavior

Error: expected key to be one of ["AZ" "INSTANCE_TYPE" "LINKED_ACCOUNT" "LINKED_ACCOUNT_NAME" "OPERATION" "PURCHASE_TYPE" "REGION" "SERVICE" "SERVICE_CODE" "USAGE_TYPE" "USAGE_TYPE_GROUP" "RECORD_TYPE" "OPERATING_SYSTEM" "TENANCY" "SCOPE" "PLATFORM" "SUBSCRIPTION_ID" "LEGAL_ENTITY_NAME" "DEPLOYMENT_OPTION" "DATABASE_ENGINE" "CACHE_ENGINE" "INSTANCE_TYPE_FAMILY" "BILLING_ENTITY" "RESERVATION_ID" "RESOURCE_ID" "RIGHTSIZING_TYPE" "SAVINGS_PLANS_TYPE" "SAVINGS_PLAN_ARN" "PAYMENT_OPTION" "AGREEMENT_END_DATE_TIME_AFTER" "AGREEMENT_END_DATE_TIME_BEFORE" "INVOICING_ENTITY" "ANOMALY_TOTAL_IMPACT_ABSOLUTE" "ANOMALY_TOTAL_IMPACT_PERCENTAGE"], got testTag

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_ce_cost_category" "test" {

effective_start = "2024-11-01T00:00:00Z"

name = "test" rule_version = "CostCategoryExpression.v1"

Rules

rule {
value = "Bolle" type = "REGULAR"

Condition

  rule{                
        dimension {                
              key           = "testTag"
              values        = ["Holle"]
              match_options = ["EQUALS"]
          }
        }

      }

}

Steps to Reproduce

terraform plan

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 day ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue