我需要更改使用 Cloudformation 中的变更集创建的卷的 snapshotid。
这是我的代码
loggingVolume:
Type: AWS::EC2::Volume
DeletionPolicy: Snapshot
Properties:
AvailabilityZone:
Fn::ImportValue: !Sub "${VpcStack}-subnet1AZ"
Encrypted: true
Size: 30
SnapshotId: !Ref SnapshotID
VolumeType: gp2
Tags:
- Key: Name
Value: !Ref "AWS::StackName"
- Key: Env
Value: !Ref Env
- Key: Geo
Value: !FindInMap [Geo2Region, !Ref "AWS::Region", geo]
- Key: Scope
Value: private
- Key: Role
Value: logging
当我更改模板中的 snapshotid 并提交变更集时,出现以下错误:
Volume properties other than AutoEnableIO, type, size, and IOPS cannot be updated. Change the properties back to previous values and update the stack again.
如何更新卷以使用不同的 snapshotId
最佳答案
此实现不支持更新,请参阅文档
关于aws-cloudformation - 使用 Cloudformation 更改卷的 snapshotid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56972914/