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

bug: --cli-input-json and command line parameters #4595

Closed
mckraken opened this issue Oct 17, 2019 · 3 comments
Closed

bug: --cli-input-json and command line parameters #4595

mckraken opened this issue Oct 17, 2019 · 3 comments
Labels
closed-for-staleness feature-request A feature should be added or improved. wontfix We have determined that we will not resolve the issue.

Comments

@mckraken
Copy link

From PR #963, we have:

--cli-input-json: This takes JSON (typically generated from --generate-cli-skeleton) from either a string or some file and uses that as the input to the command line operation. Additional arguments can be added to command line. If there are collisions between the two, the value from argument is used over the value from the input JSON

From my testing with aws ssm start-automation-execution... using the UpdateLinuxAMI document, the first level parameters (e.g. DocumentName) are kept, but if I put ANY --parameters on the command line (e.g. SourceAmiId), it overwrites ALL parameters in the passed JSON document.

I would expect that I would be able to define default values for the needed parameters in the passed JSON document and override those default values passing in the SourceAmiId and TargetAmiName from the command line, but if I pass in any value on the command line, I have to pass in all values on the command line.

@bisdavid
Copy link
Contributor

@mckraken,
Thanks for the feedback. I'm sorry to say, but that is working as designed. The "--parameters" value is actually a single parameter that takes a string (despite its ability to express several values in that string). As the docs state, if you supply a parameter on the command line (even a compound one like "--parameters") then that overrides any "--parameters" string that you might have in the skeleton input file.

@mckraken
Copy link
Author

@bisdavid Thank you for the response. I was wondering if this was the case (only working one level deep on the overwrite/preserve for "collisions"). Can we put in a feature request to allow a second level working to allow specifying some values for compound parameters in the JSON and some on the command line?

@kdaily kdaily added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 31, 2020
@kdaily
Copy link
Member

kdaily commented Oct 7, 2020

Hi @mckraken,

Sorry for the delay in getting back to this. I can understand what you're trying to do, but I think it adds more complexity than is necessary. This would be a kind of 'deep merge' that the client would have to manage. This would make order of precedence and debugging where specific parameter values came from very difficult.

@kdaily kdaily added wontfix We have determined that we will not resolve the issue. closing-soon This issue will automatically close in 4 days unless further comments are made. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2020
@github-actions github-actions bot added closed-for-staleness and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness feature-request A feature should be added or improved. wontfix We have determined that we will not resolve the issue.
Projects
None yet
Development

No branches or pull requests

3 participants