aws-solutions / aws-control-tower-customizations

The Customizations for AWS Control Tower solution combines AWS Control Tower and other highly-available, trusted AWS services to help customers more quickly set up a secure, multi-account AWS environment using AWS best practices.
https://docs.aws.amazon.com/controltower/latest/userguide/cfct-overview.html
Apache License 2.0
354 stars 205 forks source link

Replacement for depends_on? #165

Open RutgerBeyen opened 1 year ago

RutgerBeyen commented 1 year ago

Describe the bug Stackset order in manifest is not honored during stack instance deletion.

To Reproduce Manifest deploys StackA which sets a cloudformation export in the member account, next StackB is deployed which uses the first export. Upon deletion of the memberaccount, StackA is deleted first, which fails because one of its exports is being still being used.

Expected behavior StackB should be deleted first. The resources in the manifest file should be deleted in reverse order of listing/creation. This behavior was possible with manifest schema version 1, which supported the depends_on attribute.

Please complete the following information about the solution:

balltrev commented 1 year ago

Hey @RutgerBeyen, thanks for bringing this up! As you've called out, CfCT's manifest v2 format doesn't currently have any explicit ordering or "depends on" functionality. I've gone ahead and opened a feature request with the team to discuss adding support for this.