turbot/steampipe-mod-terraform-aws-compliance

Query: elasticbeanstalk_environment_use_managed_updates

Usage

powerpipe query terraform_aws_compliance.query.elasticbeanstalk_environment_use_managed_updates

Steampipe Tables

SQL

select
address as resource,
case
when jsonb_typeof(attributes_std -> 'setting') = 'array'
and exists(
select
1
from
jsonb_array_elements(attributes_std -> 'setting') as setting
where
(setting ->> 'namespace') = 'aws:elasticbeanstalk:managedactions'
and (setting ->> 'name') = 'ManagedActionsEnabled'
and (setting ->> 'value') :: boolean
) then 'ok'
when jsonb_typeof(attributes_std -> 'setting') = 'object'
and (attributes_std -> 'setting' ->> 'namespace') = 'aws:elasticbeanstalk:managedactions'
and (attributes_std -> 'setting' ->> 'name') = 'ManagedActionsEnabled'
and (attributes_std -> 'setting' ->> 'value') :: boolean then 'ok'
else 'alarm'
end status,
split_part(address, '.', 2) || case
when jsonb_typeof(attributes_std -> 'setting') = 'array'
and exists(
select
1
from
jsonb_array_elements(attributes_std -> 'setting') as setting
where
(setting ->> 'namespace') = 'aws:elasticbeanstalk:managedactions'
and (setting ->> 'name') = 'ManagedActionsEnabled'
and (setting ->> 'value') :: boolean
) then ' managed updates enabled'
when jsonb_typeof(attributes_std -> 'setting') = 'object'
and (attributes_std -> 'setting' ->> 'namespace') = 'aws:elasticbeanstalk:managedactions'
and (attributes_std -> 'setting' ->> 'name') = 'ManagedActionsEnabled'
and (attributes_std -> 'setting' ->> 'value') :: boolean then ' managed updates enabled'
else ' managed updates disabled'
end || '.' as reason,
path || ':' || start_line
from
terraform_resource
where
type = 'aws_elastic_beanstalk_environment';

Controls

The query is being used by the following controls: