Resource: aws_ce_cost_category

Provides a CE Cost Category.

Example Usage

resource "aws_ce_cost_category" "test" {
  name         = "NAME"
  rule_version = "CostCategoryExpression.v1"
  rule {
    value = "production"
    rule {
      dimension {
        key           = "LINKED_ACCOUNT_NAME"
        values        = ["-prod"]
        match_options = ["ENDS_WITH"]
      }
    }
  }
  rule {
    value = "staging"
    rule {
      dimension {
        key           = "LINKED_ACCOUNT_NAME"
        values        = ["-stg"]
        match_options = ["ENDS_WITH"]
      }
    }
  }
  rule {
    value = "testing"
    rule {
      dimension {
        key           = "LINKED_ACCOUNT_NAME"
        values        = ["-dev"]
        match_options = ["ENDS_WITH"]
      }
    }
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

rule

inherited_value

rule

cost_category

dimension

tags

split_charge_rule

parameter

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import aws_ce_cost_category using the id. For example:

import {
  to = aws_ce_cost_category.example
  id = "costCategoryARN"
}

Using terraform import, import aws_ce_cost_category using the id. For example:

% terraform import aws_ce_cost_category.example costCategoryARN