'Changing the snapshotid for a volume using Cloudformation

I need to change the snapshotid of a volume that was created using changeset in Cloudformation.

Here's my code

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

When i change the snapshotid within my template and submit a changeset, here's the error I get:

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

How can i update the volume to use a different snapshotId



Solution 1:[1]

updates not supported for this implementation, see doc

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-ebs-volume.html#cfn-ec2-ebs-volume-snapshotid

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 3dVaR