question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`cfn submit --set-default` isn't correctly defaulting to true

See original GitHub issue

In submit.py, line 35 it looks as though --set-default is supposed to default to true. When I submit resources, the default version is not updated unless I specify --set-default explicitly.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tobywfcommented, Jan 9, 2020

Ah yes ok, so the intended default behaviour is not to make it default? It could be nice if cfn submit warned you about it 😃

for some context, --set-default is because it didn’t used to set the default, and we didn’t want to change this behaviour. i’m not sure if any automated deployment is using cfn submit already, but a change like this would require a bit of a version bump and a warning in the changelog at the very least. (in hindsight, it would’ve been super useful to always do this and have the automated case use --no-set-default or something)

1reaction
jotompkicommented, Jan 8, 2020

Here’s the current description of the command:

cfn submit --help
usage: cfn submit [-h] [-v] [--dry-run] [--endpoint-url ENDPOINT_URL]
                  [--region REGION] [--set-default]
                  [--role-arn ROLE_ARN | --no-role]

This sub command uploads the resource type to CloudFormation. Projects can be
created via the 'init' sub command.

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Increase the output verbosity. Can be specified
                        multiple times.
  --dry-run             Package the project, but do not submit.
  --endpoint-url ENDPOINT_URL
                        CloudFormation endpoint to use.
  --region REGION       AWS Region to submit the resource type.
  --set-default         If registration is successful, set submitted version
                        to the default.
  --role-arn ROLE_ARN   Role ARN that CloudFormation will use when invoking
                        handlers.
  --no-role             Register the type without an explicit execution role
                        (Will not be able to invoke AWS APIs).

Do you think additional info should be added here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

submit - CloudFormation Command Line Interface
The following command registers your extension. cfn submit --set-default.
Read more >
Walkthrough: Develop a resource type - CloudFormation ...
In this walkthrough, we'll use the CloudFormation CLI to create a sample resource type, Example::Testing::WordPress . This includes modeling the schema, ...
Read more >
Writing an AWS CloudFormation Resource Provider in ...
If you used submit multiple times, you can use `cfn submit –set-default` to immediately update the version used by CloudFormation.
Read more >
AWS CloudFormation Hooks
AWS CloudFormation Hooks allows users to verify AWS infrastructure components defined in AWS CloudFormation templates, like S3 Buckets or ...
Read more >
Using CloudFormation Modules for Serverless Standard ...
Now we use the time to look at the deploy command: cfn submit -v --set-default. submit ist the deploy command for the module....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found