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

aws cloudformation validate-template should check for duplicate resource names #2404

Closed
autopulated opened this issue Jan 22, 2017 · 3 comments
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information.

Comments

@autopulated
Copy link

Currently both update-stack and validate-template silently ignore duplicate resources keys in a JSON template file, this is a source of errors that can be hard to notice in large templates!

@autopulated autopulated changed the title aws cloud formation validate-template should check for duplicate resource names aws cloudformation validate-template should check for duplicate resource names Jan 22, 2017
@kyleknap
Copy link
Contributor

So ideally I think this validation logic should live upstream in the service logic. The CLI really only takes parameters provided through command line options, converts it into an HTTP request, and parses/prints out the HTTP response to the user. If the validation lived in the service, all tools and clients accessing the API will have the validation logic available to them and not just the CLI.

I would recommend starting a thread in the AWS Developer Forums as there is not much that can be done from the CLI's side. Let us know if you have anymore questions.

@kyleknap kyleknap added closing-soon This issue will automatically close in 4 days unless further comments are made. move-to-forums labels Jan 23, 2017
@autopulated
Copy link
Author

So, the reason to do this in the client is (as I understand it), a --template-body file will be loaded by botocore (https://github.com/boto/botocore/blob/00819aac50957241436d980af8063c5a0b578c85/botocore/handlers.py#L132) – and in the process duplicate keys are silently dropped.

Should I open an issue on botocore for that?

@stealthycoin
Copy link
Contributor

The behavior of duplicate keys is undefined under the JSON spec, since we simply use the python implementation we will have whatever behavior they have decided on.

@diehlaws diehlaws added guidance Question that needs advice or information. and removed move-to-forums labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

4 participants