aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::EC2::Instance False positive at BlockDeviceMappings when adding volume attachment resource
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
1. Title
-> AWS::EC2::Instance False positive at BlockDeviceMappings when adding volume attachment resource
2. Scope of request
-> When VolumeAttachment is used along with the BlockDeviceMappings, it shows drifted even though the Volume is attached.
3. Expected behavior
-> Drift Status after stack creation should be "sync"
Sample template snippet to recreate issue:
```
---
AWSTemplateFormatVersion: "2010-09-09"
Resources:
01VolumeStripeOneHANAMountPoint:
Type: AWS::EC2::VolumeAttachment
DependsOn: MyInstance
Properties:
InstanceId: !Ref MyInstance
VolumeId: vol-0704e0e9ea96e25bb
Device: /dev/sdb
MyInstance:
Type: AWS::EC2::Instance
Properties:
SubnetId : subnet-27b22a7c
InstanceType: "t3.large"
ImageId: ami-0080e4c5bc078760e # required
KeyName: northVirginia # optional
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeSize: 8
VolumeType: gp2
```
Note - make sure volume and ec2 are in same subnet/az.

Contributor guide
Assessment
This issue has not been assessed yet.