-
Notifications
You must be signed in to change notification settings - Fork 189
Fix installing multiple environments in one account #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit changes the default functionality from creating the macro resources to not. This allows the onboarding service to update the base stack without redoing the same logic for knowing whether the macro resources should be created.
brtrvn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had discussed using the IAM role/policy as the lookup key to "know" whether the macro (and its lambda, log group, etc) had been installed in the current AWS Region. Pros/cons now that we know macros are regional?
| } | ||
|
|
||
| private boolean doesCfnMacroResourceExist() { | ||
| // this assumes that the macro resource exists in CloudFormation IFF all requisite resources also exist, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/IFF/IF/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IFF here meaning "if and only if".
|
|
||
| private boolean doesCfnMacroResourceExist() { | ||
| // this assumes that the macro resource exists in CloudFormation IFF all requisite resources also exist, | ||
| // e.g. the macro Lambda function, execution role, and log group. this should always be true, since the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. (in other words) not e.g. (for example)
Instead now we're just creating a "regional" IAM policy by Parameterizing the name. The assumption described in |
brtrvn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying the comments. Looking good.
With the addition of the multicontainer feature and the usage of the CloudFormation macro to control updates according to Application Services, the ability to install multiple environments in a single account (typically for testing purposes) was broken.
This commit fixes that bug by adding a Parameter to the base stack that will only create those CloudFormation macro resources if they do not already exist.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license