【问题标题】:Changing the snapshotid for a volume using Cloudformation使用 Cloudformation 更改卷的快照 ID
【发布时间】:2022-04-22 05:43:04
【问题描述】:

我需要更改使用 Cloudformation 中的变更集创建的卷的快照 ID。

这是我的代码

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

当我在模板中更改快照 ID 并提交变更集时,出现以下错误:

Volume properties other than AutoEnableIO, type, size, and IOPS cannot be updated. Change the properties back to previous values and update the stack again.

如何更新卷以使用不同的快照 ID

【问题讨论】:

    标签: amazon-cloudformation


    【解决方案1】:
    猜你喜欢
    • 2018-10-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    • 2016-07-09
    • 1970-01-01
    • 2019-04-07
    • 2020-11-27
    相关资源
    最近更新 更多