Loading controls...
Control: Block and Boot volumes should be resized if too large
Description
Large core volumes are unusual, expensive and should be reviewed.
Usage
Run the control in your terminal:
steampipe check oci_thrifty.control.boot_and_block_volume_large
Snapshot and share results via Steampipe Cloud:
steampipe loginsteampipe check --share oci_thrifty.control.boot_and_block_volume_large
Plugins & Tables
Params
Args | Name | Default | Description | Variable |
---|---|---|---|---|
$1 | boot_and_block_volume_max_size_gb |
| The maximum size (GB) allowed for boot and block volumes. |
SQL
with all_volumes_with_size as ( select id, _ctx, tenant_id, compartment_id, region, display_name, lifecycle_state, size_in_gbs from oci_core_volume union select id, _ctx, tenant_id, compartment_id, region, display_name, lifecycle_state, size_in_gbs from oci_core_boot_volume)select a.id as resource, case when a.size_in_gbs <= $1 then 'ok' else 'alarm' end as status, a.display_name || ' with size ' || a.size_in_gbs || ' gb.' as reason, coalesce(c.name, 'root') as compartment, a.regionfrom all_volumes_with_size as a left join oci_identity_compartment as c on c.id = a.compartment_idwhere a.lifecycle_state <> 'TERMINATED';