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-resources does not exist in aws cloudformation create-generated-template command #8856

Closed
nishikkr opened this issue Aug 9, 2024 · 2 comments
Assignees
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. cloudformation documentation This is a problem with documentation.

Comments

@nishikkr
Copy link

nishikkr commented Aug 9, 2024

Describe the issue

Following the step4 of Documentation "Create a template from scanned resources (AWS CLI)" https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html#create-template-from-scanned-resources-cli

It says
Step 4: Create your stack template
To create a new stack template, use the create-generated-template command, specifying your template name and your JSON text file. When the --template-configuration option isn't included, the UpdateReplacePolicy and DeletionPolicy policies are set to Retain by default.

aws cloudformation create-generated-template \
  --generated-template-name MyTemplate \
  --add-resources file://resources.json

When you actually run this command you will get this error.

❯ aws --version                                 
aws-cli/2.17.25 Python/3.11.9 Darwin/23.5.0 source/arm64

❯ aws cloudformation create-generated-template \
  --generated-template-name MyTemplate \
  --resources file://resources.json 
  
  usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: --add-resources, file://resources.json

You can fix this issue by changing the --add-resources to --resources

Links

Step4 from this documentation
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/iac-generator-create-template-from-scanned-resources.html#create-template-from-scanned-resources-cli : Create a template from scanned resources - Create a template from scanned resources (AWS CLI)

@nishikkr nishikkr added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Aug 9, 2024
@tim-finnigan tim-finnigan self-assigned this Aug 12, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reporting this issue. I will report this to the CloudFormation team to update their user guide to change --add-resources to --resources. In the future you can also use the Provide feedback link to send documentation feedback directly to the appropriate team.

@tim-finnigan tim-finnigan added closing-soon This issue will automatically close in 4 days unless further comments are made. cloudformation and removed needs-triage This issue or PR still needs to be triaged. labels Aug 12, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

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. cloudformation documentation This is a problem with documentation.
Projects
None yet
Development

No branches or pull requests

2 participants