Harshdeep _079
Harshdeep _079

Reputation: 1

Unable to attach volume attach to EC2 instance using Cloudformation

I created a template in which I have an EC2 instance and a volume in the same template. I want to attach the volume to the EC2 instance, but I get a "volume does not exist" error even though I used the DependsOn attribute.

  VolumeAttachment:
    Type: AWS::EC2::VolumeAttachment
    DependsOn: PowerBIDesktopVolumeAttach
    Properties:
      InstanceId: !Ref EC2Instance
      VolumeId: !Ref VolumeAttach
      Device: "xvdb"

Upvotes: 0

Views: 50

Answers (0)

Related Questions