Skip to content

(codedeploy): unable to configure disable automatically rollback #21691

@msysh

Description

@msysh

Describe the bug

In creating a DeploymentGroup, automatically rollback cannot be disabled because there is no way to set the enabled property of auto-rollback-configuration to false.

It cannot be disabled by setting all deploymentInAlarm, failedDeployment, and stoppedDeployment to false.

Expected Behavior

It is expected to be disabled if deploymentInAlarm, failedDeployment, and stoppedDeployment are false.

Current Behavior

Currently, setting all properties of autoRollback to false will not disable automatic rollback.

The following is an excerpt of the output from aws deploy get-deployment-group in CLI after deploying with all autoRollback properties, deploymentInAlarm, failedDeployment and stoppedDeployment set to false.

{
  "deploymentGroupInfo": {
    "autoRollbackConfiguration": {
      "enabled": true,
      "events": [
        "DEPLOYMENT_FAILURE"
      ]
    }
  }
}

Reproduction Steps

Setting all properties of autoRollback to false does not disable autoRollback.

new cdk.aws_codedeploy.ServerDeploymentGroup(this, 'DeploymentGroup', {
  autoRollback: {
    deploymentInAlarm: false,
    failedDeployment: false,
    stoppedDeployment: false,
  },
});

Possible Solution

How about disabling autoRollback if all its properties are set false?

Additional Information/Context

No response

CDK CLI Version

2.38.1 (build a5ced21)

Framework Version

No response

Node.js Version

v16.14.0

OS

macOS 11.6.8

Language

Typescript

Language Version

3.9.10

Other information

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions