Internet gateway must be attached to a VPC

Medium AWS General aws-ec2-internetgateway-internet-gateway-attached

Applies to

  • AWS::EC2::InternetGateway

What CGPulse checks

A resource passes this rule when attachments must be set true. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Attach the internet gateway to the intended VPC or delete if unused. In AWS Console: VPC > Internet gateways > Attach to VPC. See: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html

Terraform

resource "aws_internet_gateway" "{name}" {
  vpc_id = aws_vpc.{name}.id
}

Compliance frameworks

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related AWS rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.