AWS::EC2::VPCBlockPublicAccessExclusion - AWS CloudFormation

AWS::EC2::VPCBlockPublicAccessExclusion

Create a VPC Block Public Access (BPA) exclusion. A VPC BPA exclusion is a mode that can be applied to a single VPC or subnet that exempts it from the account’s BPA mode and will allow bidirectional or egress-only access. You can create BPA exclusions for VPCs and subnets even when BPA is not enabled on the account to ensure that there is no traffic disruption to the exclusions when VPC BPA is turned on. To learn more about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::EC2::VPCBlockPublicAccessExclusion", "Properties" : { "InternetGatewayExclusionMode" : String, "SubnetId" : String, "Tags" : [ Tag, ... ], "VpcId" : String } }

YAML

Type: AWS::EC2::VPCBlockPublicAccessExclusion Properties: InternetGatewayExclusionMode: String SubnetId: String Tags: - Tag VpcId: String

Properties

InternetGatewayExclusionMode

The desired VPC Block Public Access mode for a specific VPC or subnet exclusion.

  • allow-bidirectional: Allow all internet traffic to and from the excluded VPCs and subnets.

  • allow-egress: Allow outbound internet traffic from the excluded VPCs and subnets. Block inbound internet traffic to the excluded VPCs and subnets. Only applies when VPC Block Public Access is set to block-bidirectional.

Required: Yes

Type: String

Allowed values: allow-bidirectional | allow-egress

Update requires: No interruption

SubnetId

The ID of the subnet you want to exclude. Required only if you don't specify VpcId.

Required: No

Type: String

Update requires: Replacement

Tags

An array of key-value pairs to apply to this resource.

Required: No

Type: Array of Tag

Update requires: No interruption

VpcId

The ID of the VPC you want to exclude. Required only if you don't specify SubnetId.

Required: No

Type: String

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the exclusion.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

ExclusionId

The ID of the exclusion.