Skip to content
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

Allow all parameters to be from SSM #141

Merged
merged 4 commits into from
Jan 14, 2021
Merged

Allow all parameters to be from SSM #141

merged 4 commits into from
Jan 14, 2021

Conversation

jamie-lynch
Copy link
Contributor

What does this change?

This PR updates the GuParameter to take a new fromSSM prop. If this prop is set to true then the type value will be wrapped with AWS::SSM::Parameter::Value. This means that all parameters extending the GuParameter can now be denoted as fromSSM. Due to the, the GuSSMParameter has been removed and the one case where it was used has been updated.

Does this change require changes to existing projects or CDK CLI?

Yes. Anywhere that is currently using the GuSSMParameter will need to be updated to use another construct with the fromSSM value set to true.

How to test

New unit tests have been added to cover the exact functionality. The GuLogShippingPolicy was using GuSSMParameter and has been refactored so you can also see that it still produces the same cloudformation.

How can we measure success?

GuParameter constructs present a more consistent interface with regard to getting values from SSM.

@jamie-lynch jamie-lynch requested a review from a team January 14, 2021 10:58
@jamie-lynch jamie-lynch added the needs-new-release Identifying significant changes to the library label Jan 14, 2021
it("passes through other values without modification", () => {
const stack = simpleGuStackForTesting();

new GuParameter(stack, "Parameter", { type: "Boolean", fromSSM: true, description: "This is a test" });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to make type an enum or validate it at some point, for a later PR though.

Jamie Lynch and others added 2 commits January 14, 2021 14:13
Co-authored-by: Akash Askoolum <akash1810@users.noreply.github.com>
@jamie-lynch jamie-lynch merged commit 68e8729 into main Jan 14, 2021
@jamie-lynch jamie-lynch deleted the jl/ssm-parameters branch January 14, 2021 14:56
@jamie-lynch jamie-lynch restored the jl/ssm-parameters branch January 14, 2021 15:02
@jamie-lynch jamie-lynch deleted the jl/ssm-parameters branch January 14, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-new-release Identifying significant changes to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants