[英]Can we parameterize Logical ID in AWS cloudformation template
In my template the resource has the following structure, 在我的模板中,资源具有以下结构,
"Resources" : {
"myVPC" : {
"Type" : "AWS::EC2::VPC",
"Properties" : {
"CidrBlock" : {"Ref" : "VpcCidr"},
"EnableDnsSupport" : {"Ref" : "VpcEnableDnsSupport"},
"EnableDnsHostnames" : {"Ref" : "VpcEnableDnsHostnames"},
"InstanceTenancy" : {"Ref" : "VpcInstanceTenancy"},
"Tags" : [ {"Key" : "Name", "Value" : {"Ref":"VpcName"}} ]
}
}
}
Is there any way to parameterize Logical ID that is "myVPC" in this template. 有什么方法可以参数化此模板中“ myVPC”的 逻辑ID 。
Not in CloudFormation. 不在CloudFormation中。 But if you're using some kind of build process/server to build your templates before pushing them to an S3 bucket, you could do this using a simple sed command.
但是,如果在使用某种构建过程/服务器来构建模板之前将其推送到S3存储桶,则可以使用简单的sed命令来执行此操作。 I guess I'm confused as to why you would want to do this, though - I don't see any obvious utility?
我想我对您为什么要执行此操作感到困惑,但是-我看不到任何明显的实用程序?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.