Control: Ensure EBS volumes attached to an EC2 instance is marked for deletion upon instance termination
Description
This rule ensures that Amazon Elastic Block Store volumes that are attached to Amazon Elastic Compute Cloud (Amazon EC2) instances are marked for deletion when an instance is terminated. If an Amazon EBS volume isn't deleted when the instance that it's attached to is terminated, it may violate the concept of least functionality.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.ec2_instance_attached_ebs_volume_delete_on_termination_enabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.ec2_instance_attached_ebs_volume_delete_on_termination_enabled --share
SQL
This control uses a named query:
ec2_instance_attached_ebs_volume_delete_on_termination_enabled