-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(cli): CDK Migrate CLI command #27325
Changes from 1 commit
5091192
ab21a14
9c9002c
659fb6f
db94dc7
f21ee4f
94d2f39
681b88d
50f4b6d
64623c4
d8052cf
c5c0d1a
81ed49f
a13630b
cb94039
06e0b88
ff41695
c884f58
9327161
7087358
8c8e37c
806d542
eb1c0e4
c02bb96
7af64c5
3104733
6cae5ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -746,6 +746,32 @@ NOTICES | |||||||||||
If you don’t want to see a notice anymore, use "cdk acknowledge <id>". For example, "cdk acknowledge 16603". | ||||||||||||
``` | ||||||||||||
|
||||||||||||
### `cdk migrate` | ||||||||||||
|
||||||||||||
⚠️**CAUTION**⚠️ CDK migrate is currently experimental. We make no guarantees about the outcome or stability of the Command or it's output. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Experimental means that it might have breaking changes in the future. Saying we make no guarantees about the commands output sounds like the command may or may not do what the documentation says, and that is not the case. Reusing the exact phrasing from another experimental command:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what we currently output when a user runs our command. Should we change it in both places? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would be in favor of that, yes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
Generates a CDK application from an existing Cloudformation template in any of the CDK supported languages. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
Required Arguments: | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In md, this will be inlined with the following lines, and not look like a title. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a paragraph above this that explains in more detail what the command is and how to use it? Think about how you would teach someone who is new to CDK how to use this command to get started with CDK. |
||||||||||||
* `--from-path <my_file_path>` - Takes the relative filse path to the JSON or YAML template of your choice | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Absolute paths should also work.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
* `--stack-name <my_stack_name>` - Used to name both the CDK application and stack. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is it used? Is it used verbatim? Is there a transformation that's applied? Is the CDK App name === the stack name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this point the CDK App name === the stack name. We want to change this later. I'll make this more explicit |
||||||||||||
Optional Arguments: | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is supposed to be a title - but will show inline and this will all be one paragraph. |
||||||||||||
* `--output-path <my_output_path>` - file path to where the file should be generated. | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
Default is the current working directory | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file? What type of file? Initially I thought this was supposed to be the generated CDK app, which is a folder (or maybe a zip file), but now I'm thinking it means the stack.ts file. If so it should say something like:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unclear by me. Fixing |
||||||||||||
* `--language <language>` - Which CDK supported language should be generated [typescript, python, csharp, java, go] | ||||||||||||
default is typesript | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
```console | ||||||||||||
$ # generate a typescript application from template.json in the local directory | ||||||||||||
$ cdk migrate --from-path ./template.json --stack-name MyAwesome | ||||||||||||
|
||||||||||||
$ # generate a python application from template.json in the local directory | ||||||||||||
$ cdk bootstrap migrate --from-path ./template.json --stack-name MyAwesome | ||||||||||||
``` | ||||||||||||
|
||||||||||||
In order for the generated stack to be immediatly deployable, that stack must either already exist in that region/account | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. put a header above this that says "Limitations" like other commands have done (import) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Overall this section is pretty confusing, but I am struggling to come up with better phrasing here. I imagine customers will read this and ask, what does it mean to be immediately deployable? How do I know if there is any overlap between existing resources and resources defined in the input template? An idea to improve clarity would be to separate this into describing the two use cases that work: 1. deploying to an environment with a deployed stack that matches the input template. 2. deploy to an environment with no deployed resources that overlap with your template definition.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
with the exact same configuration of resources, or not exist in that account/region at all. This effectively means | ||||||||||||
you need to get the template you are using from a deployed stack and use it in that region, or use it in a new one | ||||||||||||
that wont have any overlap with deployed resources | ||||||||||||
|
||||||||||||
### Bundling | ||||||||||||
|
||||||||||||
By default asset bundling is skipped for `cdk list` and `cdk destroy`. For `cdk deploy`, `cdk diff` | ||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is under the "Notices" section. Can you move it up to the "Commands" section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't CDK notices the command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. there is a section header for
Notices
withcdk notices
andcdk acknowledge
both under it. If you view this file as rendered markdown, it is clear that this command is not in the right section.