Passing dynamic variables/parameters in CDK #19581
Unanswered
tirth-pipalia
asked this question in
Q&A
Replies: 2 comments
-
Python allows for using instance_type = ec2.InstanceType.of( ec2.instanceClass['BURSTABLE3'], ec2.InstanceSize['MICRO']) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using python for CDK development and want to pass dynamic values/parameters from the user.
Currently I'm using cdk.json file and passing parameters as context values. Fetching this values using node.try_get_context().
This approach is feasible only when required parameter value is in String, Integer, Float, Boolean format.
I'm having issue in passing parameter which is of enum type. Is there any way to pass string into enum formart for CDK.
Example: instance_type=ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE3, ec2.InstanceSize.MICRO),
So can I pass ec2.InstanceClass.BURSTABLE3 and ec2.InstanceSize.MICRO dynamically.
Thank you for any leads.
Beta Was this translation helpful? Give feedback.
All reactions