AWS AppConfig Environment
This page shows how to write Terraform and CloudFormation for AppConfig Environment and write them securely.
aws_appconfig_environment (Terraform)
The Environment in AppConfig can be configured in Terraform with the resource name aws_appconfig_environment
. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_appconfig_environment" "this" {
name = "live"
application_id = aws_appconfig_application.this.id
}
Parameters
The following arguments are supported:
application_id
- (Required, Forces new resource) The AppConfig application ID. Must be between 4 and 7 characters in length.name
- (Required) The name for the environment. Must be between 1 and 64 characters in length.description
- (Optional) The description of the environment. Can be at most 1024 characters.monitor
- (Optional) Set of Amazon CloudWatch alarms to monitor during the deployment process. Maximum of 5. See Monitor below for more details.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefault_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Monitor
The monitor
block supports the following:
alarm_arn
- (Required) ARN of the Amazon CloudWatch alarm.alarm_role_arn
- (Optional) ARN of an IAM role for AWS AppConfig to monitoralarm_arn
.
In addition to all arguments above, the following attributes are exported:
arn
- The Amazon Resource Name (ARN) of the AppConfig Environment.id
- The AppConfig environment ID and application ID separated by a colon (:
).environment_id
- The AppConfig environment ID.tags_all
- A map of tags assigned to the resource, including those inherited from the providerdefault_tags
configuration block.
Explanation in Terraform Registry
Provides an AppConfig Environment resource for an
aws_appconfig_application
resource. One or more environments can be defined for an application.
AWS::AppConfig::Environment (CloudFormation)
The Environment in AppConfig can be configured in CloudFormation with the resource name AWS::AppConfig::Environment
. 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
-
Description
optional - String -
Monitors
optional - List of Monitors -
ApplicationId
required - String -
Tags
optional - List of Tags -
Name
required - String
Explanation in CloudFormation Registry
The
AWS::AppConfig::Environment
resource creates an environment, which is a logical deployment group of AWS AppConfig targets, such as applications in aBeta
orProduction
environment. You define one or more environments for each AWS AppConfig application. You can also define environments for application subcomponents such as theWeb
,Mobile
andBack-end
components for your application. You can configure Amazon CloudWatch alarms for each environment. The system monitors alarms during a configuration deployment. If an alarm is triggered, the system rolls back the configuration.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 Environment?
AWS AppConfig Environment 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 Environment?
For Terraform, the easyas314159/lobbyboy source code example is useful. See the Terraform Example section for further details.