AWS AppConfig Configuration Profile
This page shows how to write Terraform and CloudFormation for AppConfig Configuration Profile and write them securely.
aws_appconfig_configuration_profile (Terraform)
The Configuration Profile in AppConfig can be configured in Terraform with the resource name aws_appconfig_configuration_profile. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_appconfig_configuration_profile" "this" {
name = "current"
application_id = aws_appconfig_application.this.id
location_uri = "hosted"
validator {
Parameters
The following arguments are supported:
application_id- (Required, Forces new resource) The application ID. Must be between 4 and 7 characters in length.location_uri- (Required, Forces new resource) A URI to locate the configuration. You can specify the AWS AppConfig hosted configuration store, Systems Manager (SSM) document, an SSM Parameter Store parameter, or an Amazon S3 object. For the hosted configuration store, specifyhosted. For an SSM document, specify either the document name in the formatssm-document://<Document_name>or the Amazon Resource Name (ARN). For a parameter, specify either the parameter name in the formatssm-parameter://<Parameter_name>or the ARN. For an Amazon S3 object, specify the URI in the following format:s3://<bucket>/<objectKey>.name- (Required) The name for the configuration profile. Must be between 1 and 64 characters in length.description- (Optional) The description of the configuration profile. Can be at most 1024 characters.retrieval_role_arn- (Optional) The ARN of an IAM role with permission to access the configuration at the specifiedlocation_uri. A retrieval role ARN is not required for configurations stored in the AWS AppConfighostedconfiguration store. It is required for all other sources that store your configuration.tags- (Optional) A map of tags to assign to the resource. If configured with a providerdefault_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.validator- (Optional) A set of methods for validating the configuration. Maximum of 2. See Validator below for more details.
Validator
The validator block supports the following:
content- (Optional, Required whentypeisLAMBDA) Either the JSON Schema content or the Amazon Resource Name (ARN) of an AWS Lambda function.type- (Optional) The type of validator. Valid values:JSON_SCHEMAandLAMBDA.
In addition to all arguments above, the following attributes are exported:
arn- The Amazon Resource Name (ARN) of the AppConfig Configuration Profile.configuration_profile_id- The configuration profile ID.id- The AppConfig configuration profile ID and application ID separated by a colon (:).tags_all- A map of tags assigned to the resource, including those inherited from the providerdefault_tagsconfiguration block.
Explanation in Terraform Registry
Provides an AppConfig Configuration Profile resource.
AWS::AppConfig::ConfigurationProfile (CloudFormation)
The ConfigurationProfile in AppConfig can be configured in CloudFormation with the resource name AWS::AppConfig::ConfigurationProfile. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
LocationUrirequired - String -
Descriptionoptional - String -
Validatorsoptional - List of Validators -
RetrievalRoleArnoptional - String -
ApplicationIdrequired - String -
Tagsoptional - List of Tags -
Namerequired - String
Explanation in CloudFormation Registry
The
AWS::AppConfig::ConfigurationProfileresource creates a configuration profile that enables AWS AppConfig to access the configuration source. Valid configuration sources include AWS Systems Manager (SSM) documents, SSM Parameter Store parameters, and Amazon S3. A configuration profile includes the following information.
The Uri location of the configuration data.
The AWS Identity and Access Management (IAM) role that provides access to the configuration data.
A validator for the configuration data. Available validators include either a JSON Schema or the Amazon Resource Name (ARN) of an AWS Lambda function.
AWS AppConfig requires that you create resources and deploy a configuration in the following order:1. Create an application1. Create an environment1. Create a configuration profile1. Create a deployment strategy1. Deploy the configurationFor more information, see AWS AppConfig in the AWS AppConfig User Guide.
Frequently asked questions
What is AWS AppConfig Configuration Profile?
AWS AppConfig Configuration Profile is a resource for AppConfig of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS AppConfig Configuration Profile?
For Terraform, the easyas314159/lobbyboy source code example is useful. See the Terraform Example section for further details.