github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/codedeploy_deployment_config.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_codedeploy_deployment_config"
     4  sidebar_current: "docs-aws-resource-codedeploy-deployment-config"
     5  description: |-
     6    Provides a CodeDeploy deployment config.
     7  ---
     8  
     9  # aws\_codedeploy\_deployment\_config
    10  
    11  Provides a CodeDeploy deployment config for an application
    12  
    13  ## Example Usage
    14  
    15  ```hcl
    16  resource "aws_codedeploy_deployment_config" "foo" {
    17    deployment_config_name = "test-deployment-config"
    18  
    19    minimum_healthy_hosts {
    20      type  = "HOST_COUNT"
    21      value = 2
    22    }
    23  }
    24  
    25  resource "aws_codedeploy_deployment_group" "foo" {
    26    app_name               = "${aws_codedeploy_app.foo_app.name}"
    27    deployment_group_name  = "bar"
    28    service_role_arn       = "${aws_iam_role.foo_role.arn}"
    29    deployment_config_name = "${aws_codedeploy_deployment_config.foo.id}"
    30  
    31    ec2_tag_filter {
    32      key   = "filterkey"
    33      type  = "KEY_AND_VALUE"
    34      value = "filtervalue"
    35    }
    36  
    37    trigger_configuration {
    38      trigger_events     = ["DeploymentFailure"]
    39      trigger_name       = "foo-trigger"
    40      trigger_target_arn = "foo-topic-arn"
    41    }
    42  
    43    auto_rollback_configuration {
    44      enabled = true
    45      events  = ["DEPLOYMENT_FAILURE"]
    46    }
    47  
    48    alarm_configuration {
    49      alarms  = ["my-alarm-name"]
    50      enabled = true
    51    }
    52  }
    53  ```
    54  
    55  ## Argument Reference
    56  
    57  The following arguments are supported:
    58  
    59  * `deployment_config_name` - (Required) The name of the deployment config.
    60  * `minimum_healthy_hosts` - (Optional) A minimum_healthy_hosts block. Minimum Healthy Hosts are documented below.
    61  
    62  A `minimum_healthy_hosts` block support the following:
    63  
    64  * `type` - (Required) The type can either be `FLEET_PERCENT` or `HOST_COUNT`.
    65  * `value` - (Required) The value when the type is `FLEET_PERCENT` represents the minimum number of healthy instances as
    66  a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, at the start of the
    67  deployment, AWS CodeDeploy converts the percentage to the equivalent number of instance and rounds up fractional instances.
    68  When the type is `HOST_COUNT`, the value represents the minimum number of healthy instances as an absolute value.
    69  
    70  ## Attributes Reference
    71  
    72  The following attributes are exported:
    73  
    74  * `id` - The deployment group's config name.
    75  * `deployment_config_id` - The AWS Assigned deployment config id