aws-cloudformation - 使用 Cloudformation 更改卷的 snapshotid

标签 aws-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

最佳答案

关于aws-cloudformation - 使用 Cloudformation 更改卷的 snapshotid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56972914/

相关文章:

amazon-web-services - 使用 If 条件在 dynamodb 提供中提供两个 GSI NonKeyAttributes 的云形成模板

aws-lambda - 如何引用使用无服务器框架创建的 AWS lambda 函数的 Arn 和名称

amazon-web-services - AWS CloudFormation 资源限制为 200

amazon-web-services - 是否可以在cloudformation上创建自增分区键?

amazon-web-services - 我们如何在AWS Cloudformation中编写If(条件)do(X和Y)else(do A和B)

amazon-web-services - 创建EMR集群时出错,EMR服务角色无效

amazon-web-services - AWS服务-启用另一个区域

aws-lambda - 如何在 CloudFormation 中设置集群创建者以在 lambda 中重用它?

amazon-web-services - 使用 cloudformation 在 Apache 上安装证书

amazon-web-services - 创建或部署新模板时 AWS CloudFormation 重用现有资源