小编efr*_*dom的帖子

使用对流层进行云形成,如何在标签上添加“启动时传播”

我正在使用python模块对流层在我的云形成模板中生成标签。当前脚本生成:

       "Tags": [{"Key":"Name", "Value":"MyTagName"}, 
                {"Key":"Version", "Value":"123456"}]
Run Code Online (Sandbox Code Playgroud)

但我需要产生

       "Tags":[{"Key":"Name", "Value":"MyTagName", "PropagateAtLaunch":"true"},
               {"Key":"Version", "Value":"123456", "PropagateAtLaunch":"true"}]
Run Code Online (Sandbox Code Playgroud)

适用的脚本部分为:

    asg = autoscaling.AutoScalingGroup("MyASG")
    asg.Tags = Tags(Name = "MyTagName", Version = "123456")
    t.add_resource(asg)
Run Code Online (Sandbox Code Playgroud)

python aws-cloudformation aws-cli troposphere

7
推荐指数
1
解决办法
4096
查看次数

标签 统计

aws-cli ×1

aws-cloudformation ×1

python ×1

troposphere ×1