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
Where longTermStorageBucketArn is the context I have passed on command line:
npm run cdk -- -c longTermStorageBucketArn=backups-690e synth
I also tested it in the constructor of a Stack object:
console.log('all context', this.node.getAllContext())
// as well as
console.log('all context', scope.node.getAllContext())
both of which produce:
all context {}
Is this the intended behavior? I don't seem to understand how to get all context from the app object, whereas app.node.getContext(...) works as expected.
The text was updated successfully, but these errors were encountered:
I am attempting to parse some context values from the CDK app. The feature was introduced by #1751
My code snippet is:
Which outputs:
However, when I toss a
console.log()
inNode.getAllContext()
, it prints my context variables:Outputs:
Where
longTermStorageBucketArn
is the context I have passed on command line:I also tested it in the constructor of a
Stack
object:both of which produce:
Is this the intended behavior? I don't seem to understand how to get all context from the
app
object, whereasapp.node.getContext(...)
works as expected.The text was updated successfully, but these errors were encountered: