You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: add --from-stack to cdk migrate command (#27155)
This change includes a refactor to migrate to align more closely with how the other cli commands are implemented.
`--from-stack` also allows users to set the account and region to get the stack template from.
Not included in this PR:
1. Integ tests - this PR has been manually tested and automated tests will be added in a subsequent PR.
2. Go support - there are still some bugs to work out with go (in cdk-from-cfn) so implementation for it will be added after that's been worked out.
3. The option to compress the app to a zip file
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@@ -274,7 +274,10 @@ async function parseCommandLineArguments(args: string[]) {
274
274
.command('migrate',false/* hidden from "cdk --help" */,(yargs: Argv)=>yargs
275
275
.option('stack-name',{type: 'string',alias: 'n',desc: 'The name assigned to the stack created in the new project. The name of the app will be based off this name as well.',requiresArg: true})
276
276
.option('language',{type: 'string',default: 'typescript',alias: 'l',desc: 'The language to be used for the new project',choices: MIGRATE_SUPPORTED_LANGUAGES})
277
+
.option('account',{type: 'string',alias: 'a'})
278
+
.option('region',{type: 'string'})
277
279
.option('from-path',{type: 'string',alias: 'p',desc: 'The path to the CloudFormation template to migrate. Use this for locally stored templates'})
280
+
.option('from-stack',{type: 'boolean',alias: 's',desc: 'USe this flag to retrieve the template for an existing CloudFormation stack'})
278
281
.option('output-path',{type: 'string',alias: 'o',desc: 'The output path for the migrated cdk app'}),
0 commit comments