amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

Support for IncludeNestedStacks in cloudformation

Open aarongundel opened this issue 4 years ago • 5 comments

SUMMARY

Please support the IncludeNestedStacks option for creating changesets in the amazon.aws.cloudformation module

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

amazon.aws.cloudformation

ADDITIONAL INFORMATION

It would be nice if the amazon.aws.cloudformation module supported the IncludeNestedStacks option when generating change sets. Documentation here... https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudformation.html#CloudFormation.Client.create_change_set - it allows change sets to be formed for nested stacks. I am not sure about the best way to implement this, because it is configuration specific to change set creation (would not apply during the stack creation phase). Below is an example of how it might work.

Verified (per link above) that this functionality is supported in boto3. I'm happy to work on a PR if no one else is working on this or has interest, but would likely need some hand-holding to get it across the finish line.

  cloudformation:
    stack_name: test
    create_changeset: true
    include_nested_stacks: true
    state: present

aarongundel avatar Nov 25 '20 04:11 aarongundel

@jillr @tremble What do you think of this feature idea?

gravesm avatar Dec 18 '20 19:12 gravesm

I've not used CloudFormation recently enough to be sure what practical impact this will have on the representation, but I'm not opposed to the idea.

tremble avatar Dec 21 '20 08:12 tremble

What's the difference between how the module works today and how you want it to work?

I can deploy stacks with nested stacks. The module creates and applies the change-set(s) for me. It all works fine.

The only issue is that the module seems to be marked as changed, even when I change nothing. (i.e. it's not idempotent). Looking at the AWS console, the parent stack updated each child stack, but the console says the child stacks weren't changed. Is that a bug in the CloudFormation API that will be fixed with this new flag that you want to add?

mdavis-xyz avatar Jan 20 '21 22:01 mdavis-xyz

+1 for this feature. Defining create_changeset: true is not working for nested stacks at the moment, but as @aarongundel mentioned it is supported in boto3.

juhau1 avatar Mar 02 '21 07:03 juhau1

@mdavis-xyz Without IncludeNestedStacks: true changeset always shows that all the nested stacks of the root stack are going to be updated. Even if you made no changes.

krabradosty avatar May 18 '21 09:05 krabradosty