Control: Amazon SQS queues should be encrypted at rest
Description
This control checks whether Amazon SQS queues are encrypted at rest.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.sqs_queue_encrypted_at_restSnapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.sqs_queue_encrypted_at_rest --shareSQL
This control uses a named query:
select  address as resource,  case    when (attributes_std -> 'kms_master_key_id') is null then 'alarm'    when coalesce(trim(attributes_std ->> 'kms_master_key_id'), '') = '' then 'alarm'    else 'ok'  end as status,  split_part(address, '.', 2) || case    when (attributes_std -> 'kms_master_key_id') is null then ' ''kms_master_key_id'' is not defined'    when coalesce(trim(attributes_std ->> 'kms_master_key_id'), '') <> '' then ' encryption at rest enabled'    else ' encryption at rest disabled'  end || '.' reason    , path || ':' || start_linefrom  terraform_resourcewhere  type = 'aws_sqs_queue';