Add stack_master validate --no-validate-template-parameters option#331
Add stack_master validate --no-validate-template-parameters option#331
stack_master validate --no-validate-template-parameters option#331Conversation
| c.option '--yes-param PARAM_NAME', String, "Auto-approve stack updates when only parameter PARAM_NAME changes" | ||
| c.action do |args, options| | ||
| options.defaults config: default_config_file | ||
| options.default config: default_config_file |
There was a problem hiding this comment.
The default option values are specified via the default method.
| c.option '--[no-]validate-template-parameters', 'Validate template parameters. Default: validate' | ||
| c.action do |args, options| | ||
| options.defaults config: default_config_file | ||
| options.default config: default_config_file, validate_template_parameters: true |
There was a problem hiding this comment.
With no option specified, resolve and validate the template parameters.
| stack_policy_body: stack_policy_body) | ||
| end | ||
|
|
||
| def self.generate_without_parameters(stack_definition, config) |
There was a problem hiding this comment.
A new way to generate a Stack instance without resolving template parameters.
petervandoros
left a comment
There was a problem hiding this comment.
Nice work 👏 👍 with an optional nitpick comment for your consideration.
| stack_policy_body: stack_policy_body) | ||
| end | ||
|
|
||
| def self.generate_without_parameters(stack_definition, config) |
There was a problem hiding this comment.
Given compile time parameters are resolved, consider renaming the method to be slightly more accurate. Perhaps something like generate_without_template_parameters?
There was a problem hiding this comment.
I'm in two minds about this. The Stack instance this generates has a parameters property which only includes the template parameters. Compile-time parameters don't seem to be a thing once the Stack instance has been generated.
There was a problem hiding this comment.
I'm in two minds about this. The Stack instance this generates has a parameters property which only includes the template parameters.
Happy to leave it as is. I don't feel strongly about it 😄 .
Compile-time parameters don't seem to be a thing once the Stack instance has been generated.
Correct. They're used to generate the template. Template parameters are part of the template and evaluated at apply time by the CloudFormation service.
There was a problem hiding this comment.
👍
I think I'll leave it as is. Differentiating between the two types of parameters here seems to be exposing internal implementation of the method. The output Stack instance names the template parameters, 'parameters', so I'll follow that convention.
Since version 2.4.0 and #323, the
stack_master validatevalidates the presence of template parameter values. This new feature is valuable, has the potential to cause pain in the upgrade process as it:To ease the upgrade path, I propose an option to disable this new functionality.