【发布时间】:2018-07-20 16:44:18
【问题描述】:
我正在尝试使用 cloudformation 将多个 EBS 卷挂载到我的 EC2 实例,但由于某种原因,只有我指定的最后一个 EBS 卷被挂载。
EG:
NewEC2Instance:
Type: AWS::EC2::Instance
DependsOn: OldSecurityGroup
Properties:
ImageId: !Ref pImageId
InstanceType: !Ref pInstanceType
BlockDeviceMappings:
-
DeviceName: /dev/sda1
Ebs:
VolumeSize: 10
DeviceName: /dev/sdf
Ebs:
VolumeSize: 11
Encrypted: true
DeviceName: /dev/sdg
Ebs:
VolumeSize: 12
Encrypted: true
DeviceName: /dev/sdh
Ebs:
VolumeSize: 100
Encrypted: true
对于上述代码,只创建了 100Gb /dev/sdh。
我认为 Cloudformation 正在覆盖 EBS 卷。
有人知道为什么吗?请帮忙!
【问题讨论】:
-
请粘贴到记事本中查看代码
标签: amazon-web-services amazon-ec2 amazon-cloudformation amazon-ebs