turbot/terraform_gcp_compliance

Query: kms_key_prevent_destroy_enabled

Usage

powerpipe query terraform_gcp_compliance.query.kms_key_prevent_destroy_enabled

Steampipe Tables

SQL

select
address as resource,
case
when (lifecycle ->> 'prevent_destroy') :: bool then 'ok'
else 'alarm'
end as status,
split_part(address, '.', 2) || case
when (lifecycle ->> 'prevent_destroy') :: bool then ' prevent destroy enabled'
else ' prevent destroy disabled'
end || '.' reason,
path || ':' || start_line
from
terraform_resource
where
type = 'google_kms_crypto_key';

Controls

The query is being used by the following controls: