Control: VPC EC2 transit gateway should not automatically accept VPC attachment requests
Description
This control checks whether the EC2 Transit Gateway has auto-accept attachment requests disabled.
Usage
Run the control in your terminal:
powerpipe control run terraform_aws_compliance.control.vpc_ec2_transit_gateway_auto_accept_attachment_requests_disabled
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run terraform_aws_compliance.control.vpc_ec2_transit_gateway_auto_accept_attachment_requests_disabled --share
SQL
This control uses a named query:
select address as resource, case when (attributes_std ->> 'auto_accept_shared_attachments') = 'enable' then 'alarm' else 'ok' end status, split_part(address, '.', 2) || case when (attributes_std ->> 'auto_accept_shared_attachments') = 'enable' then ' automatically accept VPC attachment requests' else ' do not automatically accept VPC attachment requests' end || '.' reason , path || ':' || start_linefrom terraform_resourcewhere type = 'aws_ec2_transit_gateway';