aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.11k stars 54 forks source link

Support setting stack termination protection, rollback configuration, and stack policy in the CloudFormation template #1127

Open cuongvo opened 2 years ago

cuongvo commented 2 years ago

Name of the resource

Other. CloudFormation API.

Resource name

AWS::CloudFormation template

Description

There's a set of parameters for configuring a stack that can only be set through direct API calls to CloudFormation. These parameters are expected to be provided on change set and stack create / update:

[--disable-rollback | --no-disable-rollback]
[--rollback-configuration <value>]
[--timeout-in-minutes <value>]
[--notification-arns <value>]
[--capabilities <value>]
[--resource-types <value>]
[--role-arn <value>]
[--on-failure <value>]
[--stack-policy-body <value>]
[--stack-policy-url <value>]
[--tags <value>]
[--enable-termination-protection | --no-enable-termination-protection]

Integration with CloudFormation happens across many services, including CodePipeline. Each service, as a new parameter is introduced, has to support it and expose it through its own API, lagging months (years) behind CloudFormation.

The ask in this issue is that CloudFormation expose a new section in a template that can take in these parameters. Similar to metadata, a new section for StackSettings, can take in say RollbackConfiguration.

This section is parsed prior to processing the template, and its values merged with what's passed in through the API call (API takes precedence).

This will allow users to use only a template to configure the behavior of their stack. It solves these issues:

https://github.com/aws/aws-cdk/issues/17871 https://github.com/aws/aws-cdk/issues/5170

The above are related to CodePipeline's CloudFormation Deploy action only selectively supporting the full capabilities exposed via CloudFormation's API, but other integrations, for example, deploying to CloudFormation from a GitHub action (https://github.com/aws-actions/aws-cloudformation-github-deploy/blob/master/src/main.ts#L101-L112) would no longer rely on the author of these integrations updating to add parameters like RollbackConfiguration (missing from the linked code).

Other Details

No response

meg2208 commented 1 year ago

Can you please provide an update on this enhancement? We are using CDK extensively now and it would be great to have auto-rollbacks built in to our pipelines.