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

Add cli config flag #78

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

gouglhupf
Copy link
Contributor

*Issue #11

Description of changes: Adds support for parameters/tags as a json file for the deploy command. See the issue for more details on why this may be useful.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@gouglhupf
Copy link
Contributor Author

gouglhupf commented Jan 15, 2022

@stilvoid Ping :). Would it be possible for you to have a look at these changes and post your thoughts?

@stilvoid
Copy link
Member

Hey, thanks so much for this and apologies for the delay in getting back to you!

I like the approach and this definitely fits what I had in mind but I have a few minor changes I'd suggest which I'll put into a review on this PR in a moment.

Copy link
Member

@stilvoid stilvoid left a comment

Choose a reason for hiding this comment

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

Thanks again for the contribution!

internal/cmd/deploy/deploy.go Outdated Show resolved Hide resolved
internal/cmd/deploy/deploy.go Outdated Show resolved Hide resolved
internal/cmd/deploy/deploy.go Outdated Show resolved Hide resolved
}

for k, v := range cliInput.Parameters {
parsedParams[k] = v
Copy link
Member

Choose a reason for hiding this comment

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

This means that tags and parameters specified in a config file will override tags and parameters supplied by --tags or --params which seems counter-intuitive.

Perhaps we should warn (or fail) on clashing tags/param keys?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the priority. The cli flags tag and param can now override the config file. When they do so, a warning will be printed. Is this what you had in mind?

@gouglhupf gouglhupf force-pushed the add-cli-json-parameter branch from 2577b92 to 1647974 Compare January 28, 2022 18:46
@gouglhupf gouglhupf force-pushed the add-cli-json-parameter branch from 1647974 to b9680a4 Compare January 28, 2022 18:52
@gouglhupf
Copy link
Contributor Author

Thanks for the feedback. I just pushed new changes to address your comments.

@gouglhupf gouglhupf requested a review from stilvoid January 28, 2022 19:24
@gouglhupf gouglhupf changed the title Add cli json parameter Add cli config flag Jan 28, 2022
Copy link
Member

@stilvoid stilvoid left a comment

Choose a reason for hiding this comment

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

lgtm

@stilvoid stilvoid merged commit b8207d5 into aws-cloudformation:main Mar 30, 2022
@gouglhupf gouglhupf deleted the add-cli-json-parameter branch May 9, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants