Giter Club home page Giter Club logo

aws-nested-changeset-bug's Introduction

Nested Changeset Bug

Around the time of re:Invent 2020, AWS introduced a new feature to generate changesets across a group of nested stacks. This was of particular interest to me as at the time I was working at an organisation that has a lot of nested stacks.

However, when I first tried it out, I came across a nasty bug which I duly reported via the organsiation's enterprise support plan. This repo contains the CloudFormation submitted to AWS support that reproduces this bug. The bug was acknowledged and a fix estimate given for March 2021.

Update: July 2021. This bug is still not fixed. Come on guys!

If you would like to see for yourself whether or not the bug is fixed, give this a go!

Steps to Reproduce

  1. Package and deploy the stack, setting the DeployRule parameter to 0
  2. From the CloudFormation Console, select Create Changeset against the root stack, using current template
  3. Set the DeployRule parameter value to 1
  4. Ensure "Change sets for nested stacks" is selected
  5. Create the changeset

Now examine the changesets created across the nested stacks. You will observe the following

  1. The root stack shows that SecurityGroupStack will be changed
  2. Click through to the SecurityGroupStack changeset
  3. Observe that the security group will be REPLACED (should not be)
  4. Check the JSON changes. Observe that the change reason is parameter VpcId
  5. Now go to the VPC nested stack and note that changeset is failed due to "The submitted information didn't contain changes."

If we now go ahead and execute this changeset, then the correct update happens. The new rule is added and the security group is NOT replaced.

Imagine my surprise when I tried this on a stack with a dozen nested stacks, each with many resources depending on the VpcId from a VPC stack that was unchanged. I saw 100+ resources across these stacks that were all claiming that they needed REPLACEMENT due to a perceived change in VpcId

Reproduction using PSCloudFormation

If you have my PSCloudFormation (v4.1.6.6 or higher), it is super-simple to deploy this stack

New-PSCFNStack -StackName nested-changeset-bug -TemplateLocation .\root-stack.yaml -DeployRule 0
New-PSCFNChangeSet -StackName nested-changeset-bug -UsePreviousTemplate -IncludeNestedStacks -ShowInBrowser -DeployRule 1

aws-nested-changeset-bug's People

Contributors

fireflycons avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.