我想根据参数值创建资源。我怎样才能做到这一点?
例子:
vpc_create = core.CfnParameter(stack, "createVPC") condition = core.CfnCondition(stack, "testeCondition", expression=core.Fn.condition_equals(vpc_create, True) ) vpc = ec2.Vpc(stack, "MyVpc", max_azs=3)
如何向 VPC 资源添加条件,以便仅当参数为 true 时才创建 VPC?
我认为我需要获取 Cloudformation 资源,如下所示:
vpc.node.default_child # And I think this returns an object from ec2.CfnVPC class, but I'm stuck here.
谢谢
catspeake
相关分类