Resource: aws_appconfig_hosted_configuration_version

Provides an AppConfig Hosted Configuration Version resource.

Example Usage

Freeform

resource "aws_appconfig_hosted_configuration_version" "example" {
  application_id           = aws_appconfig_application.example.id
  configuration_profile_id = aws_appconfig_configuration_profile.example.configuration_profile_id
  description              = "Example Freeform Hosted Configuration Version"
  content_type             = "application/json"

  content = jsonencode({
    foo            = "bar",
    fruit          = ["apple", "pear", "orange"],
    isThingEnabled = true
  })
}

Feature Flags

resource "aws_appconfig_hosted_configuration_version" "example" {
  application_id           = aws_appconfig_application.example.id
  configuration_profile_id = aws_appconfig_configuration_profile.example.configuration_profile_id
  description              = "Example Feature Flag Configuration Version"
  content_type             = "application/json"

  content = jsonencode({
    flags : {
      foo : {
        name : "foo",
        _deprecation : {
          "status" : "planned"
        }
      },
      bar : {
        name : "bar",
        attributes : {
          someAttribute : {
            constraints : {
              type : "string",
              required : true
            }
          },
          someOtherAttribute : {
            constraints : {
              type : "number",
              required : true
            }
          }
        }
      }
    },
    values : {
      foo : {
        enabled : "true",
      },
      bar : {
        enabled : "true",
        someAttribute : "Hello World",
        someOtherAttribute : 123
      }
    },
    version : "1"
  })
}

Argument Reference

This resource supports the following arguments:

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 AppConfig Hosted Configuration Versions using the application ID, configuration profile ID, and version number separated by a slash (/). For example:

import {
  to = aws_appconfig_hosted_configuration_version.example
  id = "71abcde/11xxxxx/2"
}

Using terraform import, import AppConfig Hosted Configuration Versions using the application ID, configuration profile ID, and version number separated by a slash (/). For example:

% terraform import aws_appconfig_hosted_configuration_version.example 71abcde/11xxxxx/2