【发布时间】:2018-05-10 00:43:10
【问题描述】:
使用 CloudFormation 创建 EC2 实例,但根卷的名称(标签)为空。如何使用 CloudFormation 进行设置?
# ec2-instance.yml (CloudFormation template)
MyInstance:
Type: "AWS::EC2::Instance"
Properties:
ImageId: "ami-da9e2cbc"
InstanceType: "t2.nano"
KeyName: !Ref "KeyPair"
Tags: # This is for EC2 instance (not root volume)
- Key: "Name"
Value: "my-instance"
我找到了“Volumes”和“BlockDeviceMappings”属性,但找不到。
【问题讨论】:
标签: amazon-web-services amazon-cloudformation