AWS CodeDeploy Deployment Config
This page shows how to write Terraform and CloudFormation for CodeDeploy Deployment Config and write them securely.
aws_codedeploy_deployment_config (Terraform)
The Deployment Config in CodeDeploy can be configured in Terraform with the resource name aws_codedeploy_deployment_config
. The following sections describe 3 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_codedeploy_deployment_config" "this" {
deployment_config_name = local.deployment_config_name
compute_platform = local.compute_platform
minimum_healthy_hosts {
type = "HOST_COUNT"
resource "aws_codedeploy_deployment_config" "main" {
deployment_config_name = local.name
minimum_healthy_hosts {
type = "HOST_COUNT"
value = 1
}
resource "aws_codedeploy_deployment_config" "deployment-config" {
deployment_config_name = "deployment-config"
minimum_healthy_hosts {
type = "HOST_COUNT"
value = 0
Parameters
-
compute_platform
optional - string -
deployment_config_id
optional computed - string -
deployment_config_name
required - string -
id
optional computed - string -
minimum_healthy_hosts
list block -
traffic_routing_config
list block-
type
optional - string -
time_based_canary
list block-
interval
optional - number -
percentage
optional - number
-
-
time_based_linear
list block-
interval
optional - number -
percentage
optional - number
-
-
Explanation in Terraform Registry
Provides a CodeDeploy deployment config for an application
AWS::CodeDeploy::DeploymentConfig (CloudFormation)
The DeploymentConfig in CodeDeploy can be configured in CloudFormation with the resource name AWS::CodeDeploy::DeploymentConfig
. 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
-
ComputePlatform
optional - String -
DeploymentConfigName
optional - String -
MinimumHealthyHosts
optional - MinimumHealthyHosts -
TrafficRoutingConfig
optional - TrafficRoutingConfig
Explanation in CloudFormation Registry
The
AWS::CodeDeploy::DeploymentConfig
resource creates a set of deployment rules, deployment success conditions, and deployment failure conditions that AWS CodeDeploy uses during a deployment. The deployment configuration specifies, through the use of aMinimumHealthyHosts
value, the number or percentage of instances that must remain available at any time during a deployment.
Frequently asked questions
What is AWS CodeDeploy Deployment Config?
AWS CodeDeploy Deployment Config is a resource for CodeDeploy of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS CodeDeploy Deployment Config?
For Terraform, the dev-chulbuji/devops_06_03_jenkins, btower-labz/terraform-aws-btlabz-arch-ref-asg-codedeploy-module and DanielePaladini/Sales-infratructure source code examples are useful. See the Terraform Example section for further details.