I am having a very simple cdk project:
import * as cdk from '@aws-cdk/core';
import { TestStack } from '../lib/test-stack';
const app = new cdk.App();
new TestStack(app, 'TestStack');
I can easily deploy the stack using cdk deploy and the name of the stack will be "TestStack" on AWS. So far so good. However I want to control the name of the stack in cloudformation. Is there any way I can fdo cdk deploy and change the default name of the stack in AWS?
something like cdk deploy --stack-name SomeName?? ((stack-name is a made up command))
I want to know this because I want to be able to build a deploy system that can build several stacks from a single cdk project. Each of these stacks will then be slightly different based on the input parameters. Something like
cdk deploy --stackName Stack1 --parameters parameters1
cdk deploy --stackName Stack2 --parameters parameters2
cdk deploy --stackName Stack3 --parameters parameters3
And I will end up having both Stack1, Stack2 and Stack3 in AWS.