empire
empire copied to clipboard
Custom Empire* CloudFormation resources should wait until stabilized
CloudFormation has a couple distinct phases:
- Update: Existing resources are updated, or, if a replacement is required, created.
- Cleanup: Any irrelevant resources are cleaned up.
Say, for example, you're creating an AWS::IAM::AccessKey and using the Custom::EmpireEnvironment to set some AWS_* environment variables. At the moment, if you wanted to roll the access key, the old access key may still be in use when it's removed. Because Custom::EmpireEnvironment doesn't wait for the stack update to stabilize, the cleanup phase is entered too soon.
The Custom::EmpireEnvironment resources should wait for the stack update to stabilize, like emp deploy -s.