Control: Disks attached to stopped instances should be reviewed
Instances that are stopped may no longer need any attached disks.
steampipe check alicloud_thrifty.control.ecs_disk_attached_stopped_instance
Plugins & Tables
selectd.arn as resource,casewhen d.instance_id is null then 'skip'when i.status = 'Running' then 'ok'else 'alarm'end as status,casewhen d.instance_id is null then d.title || ' not attached to instance.'when i.status = 'Running' then d.title || ' attached to running instance' || ' ' || d.instance_id || '.'else d.title || ' attached to stopped instance' || ' ' || d.instance_id || '.'end as reason,d.region,d.account_idfromalicloud_ecs_disk as dleft join alicloud_ecs_instance as i on d.instance_id = i.instance_id;