You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The blockDevices property of the ASG contains this description:
@default
- Uses the block device mapping of the AMI
So my understanding is, that the volumes are encrypted when the AMI device mapping is encrypted. The AMI device indeed is encrypted and so is the volume of resulting EC2 instances of the ASG.
cdk-nag fails with
[Error at /StackName/asg/LaunchConfig] AwsSolutions-EC26: The resource creates one or more EBS volumes that have encryption disabled.
Is this intentional and am I supposed to suppress this? IMHO, when no volumes are defined, there should be nothing to complain about. At very least the error message should be adjusted and instead should point out, that this might be due to use of an AMI without specifically setting blockDevices.
Reproduction Steps
Create and ASG w/o blockDevices.
What did you expect to happen?
Validation pass
What actually happened?
Validation fails
[Error at /StackName/asg/LaunchConfig] AwsSolutions-EC26: The resource creates one or more EBS volumes that have encryption disabled.
cdk-nag version
2.27.129
Language
Typescript
Other information
No response
The text was updated successfully, but these errors were encountered:
Yes , this is intentional. If you don't explicitly set the root volume on the EC2 instance as encrypted, it will be unencrypted.
The documentation around this rule isn't great 😔, any suggestions?
dontirun
added
other
This issue doesn't fit into the other categories
and removed
bug
Something isn't working
needs-triage
This issue or PR still needs to be triaged.
labels
Sep 13, 2023
What is the problem?
I have an ASG defined like so:
The blockDevices property of the ASG contains this description:
So my understanding is, that the volumes are encrypted when the AMI device mapping is encrypted. The AMI device indeed is encrypted and so is the volume of resulting EC2 instances of the ASG.
cdk-nag fails with
The source of this false positive is
cdk-nag/src/rules/ec2/EC2EBSVolumeEncrypted.ts
Lines 66 to 68 in 872fa0c
Is this intentional and am I supposed to suppress this? IMHO, when no volumes are defined, there should be nothing to complain about. At very least the error message should be adjusted and instead should point out, that this might be due to use of an AMI without specifically setting blockDevices.
Reproduction Steps
Create and ASG w/o blockDevices.
What did you expect to happen?
Validation pass
What actually happened?
Validation fails
cdk-nag version
2.27.129
Language
Typescript
Other information
No response
The text was updated successfully, but these errors were encountered: