LaunchConfig 创建的实例的 CloudFormation 标签
CloudFormation tags for instances created by LaunchConfig
如何向 CloudFormation 的 LaunchConfig 创建的实例添加名称标签?我以为它会在这个部分,但它不是一个选项。
{
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Properties" : {
"AssociatePublicIpAddress" : Boolean,
"BlockDeviceMappings" : [ BlockDeviceMapping, ... ],
"ClassicLinkVPCId" : String,
"ClassicLinkVPCSecurityGroups" : [ String, ... ],
"EbsOptimized" : Boolean,
"IamInstanceProfile" : String,
"ImageId" : String,
"InstanceId" : String,
"InstanceMonitoring" : Boolean,
"InstanceType" : String,
"KernelId" : String,
"KeyName" : String,
"PlacementTenancy" : String,
"RamDiskId" : String,
"SecurityGroups" : [ SecurityGroup, ... ],
"SpotPrice" : String,
"UserData" : String
}
}
我想知道我是否应该创建一个实例资源并将设置放在那里,然后 link 它到 launchconfig,但我找不到任何文档来支持这个想法。
AWS::AutoScaling::LaunchConfiguration is meant to be used in conjunction with AWS::AutoScaling::AutoScalingGroup. The AutoScalingGroup itself has a Tags property that can be used for setting the instance name among other tags. One note about these tags, they're slightly different than the tags used in most other CloudFormation resources, as they have a PropagateAtLaunch
property, which says if the tag should be applied to instances of the AutoScalingGroup, or just the AutoScalingGroup itself. See the Auto Scaling Tags Property Type了解更多详情。
如何向 CloudFormation 的 LaunchConfig 创建的实例添加名称标签?我以为它会在这个部分,但它不是一个选项。
{
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Properties" : {
"AssociatePublicIpAddress" : Boolean,
"BlockDeviceMappings" : [ BlockDeviceMapping, ... ],
"ClassicLinkVPCId" : String,
"ClassicLinkVPCSecurityGroups" : [ String, ... ],
"EbsOptimized" : Boolean,
"IamInstanceProfile" : String,
"ImageId" : String,
"InstanceId" : String,
"InstanceMonitoring" : Boolean,
"InstanceType" : String,
"KernelId" : String,
"KeyName" : String,
"PlacementTenancy" : String,
"RamDiskId" : String,
"SecurityGroups" : [ SecurityGroup, ... ],
"SpotPrice" : String,
"UserData" : String
}
}
我想知道我是否应该创建一个实例资源并将设置放在那里,然后 link 它到 launchconfig,但我找不到任何文档来支持这个想法。
AWS::AutoScaling::LaunchConfiguration is meant to be used in conjunction with AWS::AutoScaling::AutoScalingGroup. The AutoScalingGroup itself has a Tags property that can be used for setting the instance name among other tags. One note about these tags, they're slightly different than the tags used in most other CloudFormation resources, as they have a PropagateAtLaunch
property, which says if the tag should be applied to instances of the AutoScalingGroup, or just the AutoScalingGroup itself. See the Auto Scaling Tags Property Type了解更多详情。