turbot/alicloud

steampipe plugin install alicloudsteampipe plugin install alicloud

Table: alicloud_kms_secret

Secret enables to manage secrets in a centralized manner throughout their lifecycle (creation, retrieval, updating, and deletion).

Examples

Basic info

select
name,
description,
arn,
secret_type,
create_time
from
alicloud_kms_secret;

List secrets that do not have automatic rotation enabled

select
name,
secret_type automatic_rotation
from
alicloud_kms_secret
where
automatic_rotation <> 'Enabled';

List secrets that have not been rotated within the last 30 days

select
name,
secret_type,
automatic_rotation
from
alicloud_kms_secret
where
last_rotation_date < (current_date - interval '30' day);

Get the extended configuration info for each secret

select
name,
extended_config -> 'CustomData' ->> 'DBName' as db_name,
extended_config ->> 'DBInstanceId' as db_instance_id,
extended_config ->> 'SecretSubType' as secret_sub_type
from
alicloud_kms_secret;

List secrets without application tag key

select
name,
tags
from
alicloud_kms_secret
where
not tags :: JSONB ? 'application';

.inspect alicloud_kms_secret

Alicloud KMS Secret

NameTypeDescription
account_idtextThe Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
arntextThe Alibaba Cloud Resource Name (ARN).
automatic_rotationtextSpecifies whether automatic key rotation is enabled.
create_timetimestamp without time zoneThe time when the KMS Secret was created.
descriptiontextThe description of the secret.
encryption_key_idtextThe ID of the KMS customer master key (CMK) that is used to encrypt the secret value.
extended_configjsonbThe extended configuration of Secret.
last_rotation_datetimestamp without time zoneDate of last rotation of Secret.
nametextThe name of the secret.
next_rotation_datetimestamp without time zoneThe date of next rotation of Secret.
planned_delete_timetimestamp without time zoneThe time when the KMS Secret is planned to delete.
regiontextThe Alicloud region in which the resource is located.
rotation_intervaltextThe rotation perion of Secret.
secret_typetextThe type of the secret.
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the resource.
titletextTitle of the resource.
update_timetimestamp without time zoneThe time when the KMS Secret was modifies.
version_idsjsonbThe list of secret versions.