turbot/terraform_azure_compliance

Query: container_instance_container_group_secure_environment_variable

Usage

powerpipe query terraform_azure_compliance.query.container_instance_container_group_secure_environment_variable

Steampipe Tables

SQL

with container_group_no_secure_environment as (
select
distinct name
from
terraform_resource,
jsonb_array_elements(attributes_std -> 'container') as c
where
type = 'azurerm_container_group'
and c -> 'environment_variables' is not null
)
select
address as resource,
case
when e.name is not null then 'alarm'
else 'ok'
end status,
split_part(address, '.', 2) || case
when e.name is not null then ' uses environment variables'
else ' does not use environment variables'
end || '.' reason
, path || ':' || start_line
from
terraform_resource as r
left join container_group_no_secure_environment as e on e.name = r.name
where
type = 'azurerm_container_group';

Controls

The query is being used by the following controls: