steampipe plugin install turbot

Table: turbot_policy_value

A policy value is the effective policy setting on an instance of a resource type. Every resource that is targeted by a given policy setting will have its own value for that policy, which will be the resultant calculated policy for the "winning" policy in the hierarchy.

Policy settings are inherited through the resource hierarchy, and values for a resource are calculated according to policy settings at or above it in the resource hierarchy. For example, a policy setting at the Turbot level will be inherited by all resources below.

It is recommended that queries to this table should include (usually in the where clause) at least one of these columns: state, policy_type_id, resource_type_id, resource_type_uri or filter.

Examples

List policy values by policy type ID

select
id,
state,
is_default,
is_calculated,
policy_type_id,
type_mod_uri
from
turbot_policy_value
where
policy_type_id = 221505068398189;

List policy values by resource ID

select
id,
state,
is_default,
is_calculated,
resource_id,
type_mod_uri
from
turbot_policy_value
where
resource_id = 161587219904115;

List non-default calculated policy values

select
id,
state,
is_default,
is_calculated,
resource_type_id,
type_mod_uri
from
turbot_policy_value
where
is_calculated
and not is_default;

Filter policy values using Turbot filter syntax

select
id,
state,
is_default,
is_calculated,
policy_type_id,
resource_id,
resource_type_id
from
turbot_policy_value
where
filter = 'state:ok';

Schema for turbot_policy_value

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
create_timestamptimestamp with time zoneWhen the policy value was first set by Turbot. (It may have been created earlier.)
dependent_controlsjsonbThe controls that depends on this policy value.
dependent_policy_valuesjsonbThe policy values that depends on this policy value.
filtertext=Filter used for this policy value list.
idbigintUnique identifier of the policy value.
is_calculatedbooleanIf true this value is derived from calculated setting inputs e.g. templateInput and template.
is_defaultbooleanIf true this value is derived from the default value of the type.
policy_type_default_templatetextDefault template used to calculate template-based policy values. Should be a Jinja based YAML string.
policy_type_idbigint=ID of the policy type for this policy value.
policy_type_titletextTitle of the policy type.
policy_type_trunk_titletextTitle with full path of the policy type.
precedencetextPrecedence of the setting: REQUIRED or RECOMMENDED.
resource_idbigint=ID of the resource for the policy value.
resource_trunk_titletextFull title (including ancestor trunk) of the resource.
resource_type_idbigint=ID of the resource type for this policy setting.
secret_valuetextSecrect value of the policy value.
setting_idbigintPolicy setting Id for the policy value.
statetext=State of the policy value.
timestamptimestamp with time zoneTimestamp when the policy value was last modified (created, updated or deleted).
type_mod_uritextURI of the mod that contains the policy value.
update_timestamptimestamp with time zoneWhen the policy value was last updated in Turbot.
valuetextValue of the policy value.
version_idbigintUnique identifier for this version of the policy value.
workspacetextSpecifies the workspace URL.