hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.85k stars 9.2k forks source link

[New Resource]: Support for VPC Block Public Access #40200

Open madhavvishnubhatta opened 4 days ago

madhavvishnubhatta commented 4 days ago

Description

Today, AWS announced Virtual Private Cloud (VPC) Block Public Access (BPA), a new centralized declarative control that enables network and security administrators to authoritatively block Internet traffic for their VPCs.

Two new resources to support the new feature to block Public Access for VPCs at Account, Org or OU level.

https://github.com/aws/aws-sdk-go-v2/blob/release-2024-11-19/service/ec2/CHANGELOG.md#v11910-2024-11-19

Requested Resource(s) and/or Data Source(s)

Potential Terraform Configuration

// BPA Options
resource "aws_vpc_block_public_access_options" "example" {
  internet_gateway_block_mode = "block-bidirectional"
}

//BPA Exclusion
resource "aws_vpc" "test" {
  cidr_block = "10.1.0.0/16"
}

resource "aws_vpc_block_public_access_exclusion" "test" {
  vpc_id = aws_vpc.test.id
  internet_gateway_exclusion_mode = "allow-bidirectional"
}

References

No response

Would you like to implement a fix?

Yes

github-actions[bot] commented 4 days ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue