使用Cloudformation更改卷的snapshotid

时间:2019-07-10 14:28:22

标签: amazon-cloudformation

我需要更改使用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

0 个答案:

没有答案