-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add region_alias support for multiple aliases in a single region #115
Conversation
Multiple region_aliases can now be in the same region, and with the prepend_region_alias_to_stack_names flag set to true, the region_alias will be part of the stack name for easier readability. ```` prepend_region_alias_to_stack_names: true region_alias: - production: us-east-1 stacks: production: vpc: template: vpc.json ```` The config above would create a stack named "production-vpc" It would also resolve parameters from: parameters/vpc.json parameters/us-east-1/vpc.json parameters/production/vpc.json
@@ -19,7 +21,12 @@ def template_file_path | |||
end | |||
|
|||
def parameter_files | |||
[ default_parameter_file_path, region_parameter_file_path ] + additional_parameter_lookup_file_paths |
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.
FYI, I'm not entirely clear on the purpose of "additional_parameter_lookup_file_paths" vs as I did it below, explicitly resolving explicitly to the region_alias as I did below. I've preserved both, but I'm interested in the rationale behind additional_parameter_lookup_file_paths.
Will this break how we currently define region aliases (as a hash)? It would be great if we could handle both to avoid having to upgrade previously written stack_master.yml files.. |
I think that was a typo in my example, but let me check. I can also rebase this now that s3 is merged in. And in the next week or so I should be able to work out the test failures. |
Hi @flyinbutrs and @stevehodgkiss A big +1 from my side for this feature :-) |
I'd honestly rather see a breaking change to just get rid of stack master using regions as keys or aliases. I have never seen any project deal in terms of "regions" for separate stacks and I've always seen stacks separated in terms of environment (dev, staging, prod). I highly suggest that stack master be overhauled to kill the region alias key in a major breaking release and move to using environments. Make region just an attribute of the stack so that an environment can be multi region if needed. |
I agree, but I think we need to come up with a better way of handling "environments" before that can happy. Open to opinions! |
This seems to have been super-seeded by #221 |
This PR is quite stale and has been superseeded. Closing for now but re-open when/if you're ready. |
Multiple region_aliases can now be in the same region, and with
the prepend_region_alias_to_stack_names flag set to true, the region_alias
will be part of the stack name for easier readability.
The config above would create a stack named "production-vpc"
It would also resolve parameters from:
parameters/vpc.json
parameters/us-east-1/vpc.json
parameters/production/vpc.json