awscc_billingconductor_pricing_rule (Resource)

A markup/discount that is defined for a specific set of services that can later be associated with a pricing plan.

Example Usage

Pricing rule with global scope

This example to create pricing rule using global scope

resource "awscc_billingconductor_pricing_rule" "example" {
  name                = "Markup10percent"

  scope               = "GLOBAL"
  type                = "MARKUP"
  modifier_percentage = 10

  tags = [
    {
      key   = "Modified By"
      value = "AWSCC"
    }

  ]
}

Pricing rule with service scope

This example create pricing rule using service scope

resource "awscc_billingconductor_pricing_rule" "example_service" {
  name = "S3Discount"

  scope               = "SERVICE"
  service             = "AmazonS3"
  type                = "DISCOUNT"
  modifier_percentage = 5

  tags = [
    {
      key   = "Modified By"
      value = "AWSCC"
    }

  ]
}

Pricing rule with with tier type

This example enable free-tier

resource "awscc_billingconductor_pricing_rule" "example_tiering" {
  name        = "EnableFreeTiering"

  scope       = "GLOBAL"
  type        = "TIERING"

  tiering = {
    free_tier = {
      activated = true
    }
  }


  tags = [
    {
      key   = "Modified By"
      value = "AWSCC"
    }

  ]
}

Pricing rule with billing entity scope

This example create using billing entity scope to markup when marketplace is in use.

resource "awscc_billingconductor_pricing_rule" "example_billing_entity" {
  name                = "MarketplaceDiscount"

  scope               = "BILLING_ENTITY"
  billing_entity      = "AWS Marketplace"
  type                = "MARKUP"
  modifier_percentage = 5

  tags = [
    {
      key   = "Modified By"
      value = "AWSCC"
    }

  ]
}

Pricing rule with SKU scope

This example provides using SKU as scope to provides discount billing item that uses t2.micro on Linux/Unix in Singapore region

resource "awscc_billingconductor_pricing_rule" "example_sku" {
  name        = "DiscountEC2_T2Micro_LinuxUnix"
  description = "5% Discount for t2.micro on Linux/Unix in Singapore region"

  scope      = "SKU"
  service    = "AmazonEC2"
  usage_type = "APS1-BoxUsage:t2.medium"
  operation  = "RunInstances"

  type                = "DISCOUNT"
  modifier_percentage = 5

  tags = [
    {
      key   = "Modified By"
      value = "AWSCC"
    }

  ]
}

Schema

Required

Optional

Read-Only

Nested Schema for tags

Required:

Nested Schema for tiering

Optional:

Nested Schema for tiering.free_tier

Required:

Import

Import is supported using the following syntax:

$ terraform import awscc_billingconductor_pricing_rule.example <resource ID>