Skip to content

Resource: awsAppconfigHostedConfigurationVersion

Provides an AppConfig Hosted Configuration Version resource.

Example Usage

Freeform

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.appconfigHostedConfigurationVersion.AppconfigHostedConfigurationVersion(
  this,
  "example",
  {
    applicationId: "${aws_appconfig_application.example.id}",
    configurationProfileId:
      "${aws_appconfig_configuration_profile.example.configuration_profile_id}",
    content:
      '${jsonencode({\n    foo            = "bar",\n    fruit          = ["apple", "pear", "orange"],\n    isThingEnabled = true\n  })}',
    contentType: "application/json",
    description: "Example Freeform Hosted Configuration Version",
  }
);

Feature Flags

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.appconfigHostedConfigurationVersion.AppconfigHostedConfigurationVersion(
  this,
  "example",
  {
    applicationId: "${aws_appconfig_application.example.id}",
    configurationProfileId:
      "${aws_appconfig_configuration_profile.example.configuration_profile_id}",
    content:
      '${jsonencode({\n    flags : {\n      foo : {\n        name : "foo",\n        _deprecation : {\n          "status" : "planned"\n        }\n      },\n      bar : {\n        name : "bar",\n        attributes : {\n          someAttribute : {\n            constraints : {\n              type : "string",\n              required : true\n            }\n          },\n          someOtherAttribute : {\n            constraints : {\n              type : "number",\n              required : true\n            }\n          }\n        }\n      }\n    },\n    values : {\n      foo : {\n        enabled : "true",\n      },\n      bar : {\n        enabled : "true",\n        someAttribute : "Hello World",\n        someOtherAttribute : 123\n      }\n    },\n    version : "1"\n  })}',
    contentType: "application/json",
    description: "Example Feature Flag Configuration Version",
  }
);

Argument Reference

The following arguments are supported:

  • applicationId - (Required, Forces new resource) Application ID.
  • configurationProfileId - (Required, Forces new resource) Configuration profile ID.
  • content - (Required, Forces new resource) Content of the configuration or the configuration data.
  • contentType - (Required, Forces new resource) Standard MIME type describing the format of the configuration content. For more information, see Content-Type.
  • description - (Optional, Forces new resource) Description of the configuration.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • arn - ARN of the AppConfig hosted configuration version.
  • id - AppConfig application ID, configuration profile ID, and version number separated by a slash (/).
  • versionNumber - Version number of the hosted configuration.

Import

AppConfig Hosted Configuration Versions can be imported by using the application ID, configuration profile ID, and version number separated by a slash (/), e.g.,

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