Show / Hide Table of Contents

Class DeploymentConfig

Provides a CodeDeploy deployment config for an application

Example Usage

Server Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var fooDeploymentConfig = new Aws.CodeDeploy.DeploymentConfig("fooDeploymentConfig", new Aws.CodeDeploy.DeploymentConfigArgs
    {
        DeploymentConfigName = "test-deployment-config",
        MinimumHealthyHosts = new Aws.CodeDeploy.Inputs.DeploymentConfigMinimumHealthyHostsArgs
        {
            Type = "HOST_COUNT",
            Value = 2,
        },
    });
    var fooDeploymentGroup = new Aws.CodeDeploy.DeploymentGroup("fooDeploymentGroup", new Aws.CodeDeploy.DeploymentGroupArgs
    {
        AlarmConfiguration = new Aws.CodeDeploy.Inputs.DeploymentGroupAlarmConfigurationArgs
        {
            Alarms = 
            {
                "my-alarm-name",
            },
            Enabled = true,
        },
        AppName = aws_codedeploy_app.Foo_app.Name,
        AutoRollbackConfiguration = new Aws.CodeDeploy.Inputs.DeploymentGroupAutoRollbackConfigurationArgs
        {
            Enabled = true,
            Events = 
            {
                "DEPLOYMENT_FAILURE",
            },
        },
        DeploymentConfigName = fooDeploymentConfig.Id,
        DeploymentGroupName = "bar",
        Ec2TagFilters = 
        {
            new Aws.CodeDeploy.Inputs.DeploymentGroupEc2TagFilterArgs
            {
                Key = "filterkey",
                Type = "KEY_AND_VALUE",
                Value = "filtervalue",
            },
        },
        ServiceRoleArn = aws_iam_role.Foo_role.Arn,
        TriggerConfigurations = 
        {
            new Aws.CodeDeploy.Inputs.DeploymentGroupTriggerConfigurationArgs
            {
                TriggerEvents = 
                {
                    "DeploymentFailure",
                },
                TriggerName = "foo-trigger",
                TriggerTargetArn = "foo-topic-arn",
            },
        },
    });
}

}

Lambda Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var fooDeploymentConfig = new Aws.CodeDeploy.DeploymentConfig("fooDeploymentConfig", new Aws.CodeDeploy.DeploymentConfigArgs
    {
        ComputePlatform = "Lambda",
        DeploymentConfigName = "test-deployment-config",
        TrafficRoutingConfig = new Aws.CodeDeploy.Inputs.DeploymentConfigTrafficRoutingConfigArgs
        {
            TimeBasedLinear = new Aws.CodeDeploy.Inputs.DeploymentConfigTrafficRoutingConfigTimeBasedLinearArgs
            {
                Interval = 10,
                Percentage = 10,
            },
            Type = "TimeBasedLinear",
        },
    });
    var fooDeploymentGroup = new Aws.CodeDeploy.DeploymentGroup("fooDeploymentGroup", new Aws.CodeDeploy.DeploymentGroupArgs
    {
        AlarmConfiguration = new Aws.CodeDeploy.Inputs.DeploymentGroupAlarmConfigurationArgs
        {
            Alarms = 
            {
                "my-alarm-name",
            },
            Enabled = true,
        },
        AppName = aws_codedeploy_app.Foo_app.Name,
        AutoRollbackConfiguration = new Aws.CodeDeploy.Inputs.DeploymentGroupAutoRollbackConfigurationArgs
        {
            Enabled = true,
            Events = 
            {
                "DEPLOYMENT_STOP_ON_ALARM",
            },
        },
        DeploymentConfigName = fooDeploymentConfig.Id,
        DeploymentGroupName = "bar",
        ServiceRoleArn = aws_iam_role.Foo_role.Arn,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DeploymentConfig
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.CodeDeploy
Assembly: Pulumi.Aws.dll
Syntax
public class DeploymentConfig : CustomResource

Constructors

View Source

DeploymentConfig(String, DeploymentConfigArgs, CustomResourceOptions)

Create a DeploymentConfig resource with the given unique name, arguments, and options.

Declaration
public DeploymentConfig(string name, DeploymentConfigArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DeploymentConfigArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ComputePlatform

The compute platform can be Server, Lambda, or ECS. Default is Server.

Declaration
public Output<string> ComputePlatform { get; }
Property Value
Type Description
Output<System.String>
View Source

DeploymentConfigId

The AWS Assigned deployment config id

Declaration
public Output<string> DeploymentConfigId { get; }
Property Value
Type Description
Output<System.String>
View Source

DeploymentConfigName

The name of the deployment config.

Declaration
public Output<string> DeploymentConfigName { get; }
Property Value
Type Description
Output<System.String>
View Source

MinimumHealthyHosts

A minimum_healthy_hosts block. Required for Server compute platform. Minimum Healthy Hosts are documented below.

Declaration
public Output<DeploymentConfigMinimumHealthyHosts> MinimumHealthyHosts { get; }
Property Value
Type Description
Output<DeploymentConfigMinimumHealthyHosts>
View Source

TrafficRoutingConfig

A traffic_routing_config block. Traffic Routing Config is documented below.

Declaration
public Output<DeploymentConfigTrafficRoutingConfig> TrafficRoutingConfig { get; }
Property Value
Type Description
Output<DeploymentConfigTrafficRoutingConfig>

Methods

View Source

Get(String, Input<String>, DeploymentConfigState, CustomResourceOptions)

Get an existing DeploymentConfig resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static DeploymentConfig Get(string name, Input<string> id, DeploymentConfigState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DeploymentConfigState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
DeploymentConfig
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.