【发布时间】:2019-04-23 02:31:15
【问题描述】:
所以我只是在创建磁盘时尝试使用 FindInMap。
我得到了结构,但我得到了错误:
“属性 BlockDeviceMappings 的值必须是 List 类型”
所以很明显我没有完全理解布局。
只是尝试我能想到的一切。不幸的是,AWS 的示例主要参考了在区域中使用它。如您所见,它并没有太大帮助。
ec2Map: ---(my map)
test: ----(outter key)
InstanceType: t2.small
volsize: 20 ----(inner key)
dev:
InstanceType: t2.small
volsize: 40
Note: there is parameter that references 'myec2instances' so I can pick the size in a drop down.
#here is where I am lost. How to I reference the other items needed like device name and volumetype?
So I get rid of the error mentioned above..
BlockDeviceMappings: !FindInMap
- ec2Map
- !Ref 'myec2instance'
- volsize
DeviceName: "/dev/sdf"
# Ebs:
# VolumeSize:
# VolumeType: gpa
我基本上是在努力做到这一点,所以当配置测试 ec2 时,它会额外增加 20gb 卷,而对于 dev 来说,它将获得 40gb 卷。
【问题讨论】: