Chad (cysense)
10/11/2021, 3:17 AMconst app = new <http://cdk.App|cdk.App>();
new BackendStack(app, `BackendStack-dev`, {
...
new FrontendStack(app, `FrontendStack-dev`, {
...
new BackendStack(app, `BackendStack-sandbox`, {
...
new FrontendStack(app, `FrontendStack-sandbox`, {
...
So if I want to deploy to sandbox
I can do something like this:
cdk deploy --require-approval never BackendStack-sandbox 'BackendStack-sandbox/**' FrontendStack-sandbox
The problem is everytime I synth/deploy CDK synths all stacks before dropping them for final output. The issue is that if I have time consuming operations (such as building assets) in my develop stack, I need to wait for them to complete when deploying to my sandbox stack. A solution I have found is to wrap the above constructs in if statements. This works but now I want to use the stack names I passed to cdk deploy. Does anyone know how I can reference this in code? In the example above I would like to get BackendStack-sandbox 'BackendStack-sandbox/**' FrontendStack-sandbox
.
I thought this would appear in the context but I am not seeing it anywhere.Frank
BackendStack-sandbox 'BackendStack-sandbox/**' FrontendStack-sandbox
might not be passed into it.