-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: parameters property in StackSet construct #447
base: main
Are you sure you want to change the base?
Conversation
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.
Hi @pcholakov! Thanks for the PR and I am very sorry about the extremely delayed review. If you're still interested in contributing this, please take a look at my comments. Nothing seems too controversial.
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'd prefer you create a new test rather than modify an existing one. parameterOverrides
is still a valid thing to do so we still need to test for it.
parameters: { | ||
Param1: 'Value1', | ||
}, |
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.
in your new test, can you add multiple parameters please
parameters: props.parameters ? Object.entries(props.parameters).map((entry) => { | ||
return { | ||
parameterKey: entry[0], | ||
parameterValue: entry[1], | ||
}; | ||
}) : undefined, |
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.
this will add parameters: undefined
to everyone's stackset, which isn't the end of the world, but people don't like snapshot diffs. instead we can do the following pattern:
...(props.parameters ? { parameters: {} } : {})
this way no parameters means no parameter property at all and no one's diff gets needlessly updated.
@@ -346,7 +347,8 @@ interface DeploymentTypeConfig { | |||
readonly callAs?: CallAs; | |||
} | |||
|
|||
interface DeploymentTypeOptions {} | |||
interface DeploymentTypeOptions { | |||
} |
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.
please change back these stylistic choices.
Hey @kaizencc, absolutely no worries - still interested in contributing this and will update with your comments addressed :-) |
Before this change, the StackSet construct supported only per-target parameter overrides. This is not sufficient to pass parameters to a stack template; parameters have to be set before they can be overridden per target -- see #115.