1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. VpcBlockPublicAccessExclusion
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.ec2.VpcBlockPublicAccessExclusion

Explore with Pulumi AI

Resource for managing an AWS EC2 (Elastic Compute Cloud) VPC Block Public Access Exclusion.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.ec2.Vpc("test", {cidrBlock: "10.1.0.0/16"});
const testVpcBlockPublicAccessExclusion = new aws.ec2.VpcBlockPublicAccessExclusion("test", {
    vpcId: test.id,
    internetGatewayExclusionMode: "allow-bidirectional",
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.ec2.Vpc("test", cidr_block="10.1.0.0/16")
test_vpc_block_public_access_exclusion = aws.ec2.VpcBlockPublicAccessExclusion("test",
    vpc_id=test.id,
    internet_gateway_exclusion_mode="allow-bidirectional")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := ec2.NewVpc(ctx, "test", &ec2.VpcArgs{
			CidrBlock: pulumi.String("10.1.0.0/16"),
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcBlockPublicAccessExclusion(ctx, "test", &ec2.VpcBlockPublicAccessExclusionArgs{
			VpcId:                        test.ID(),
			InternetGatewayExclusionMode: pulumi.String("allow-bidirectional"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.Ec2.Vpc("test", new()
    {
        CidrBlock = "10.1.0.0/16",
    });

    var testVpcBlockPublicAccessExclusion = new Aws.Ec2.VpcBlockPublicAccessExclusion("test", new()
    {
        VpcId = test.Id,
        InternetGatewayExclusionMode = "allow-bidirectional",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.VpcBlockPublicAccessExclusion;
import com.pulumi.aws.ec2.VpcBlockPublicAccessExclusionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new Vpc("test", VpcArgs.builder()
            .cidrBlock("10.1.0.0/16")
            .build());

        var testVpcBlockPublicAccessExclusion = new VpcBlockPublicAccessExclusion("testVpcBlockPublicAccessExclusion", VpcBlockPublicAccessExclusionArgs.builder()
            .vpcId(test.id())
            .internetGatewayExclusionMode("allow-bidirectional")
            .build());

    }
}
Copy
resources:
  test:
    type: aws:ec2:Vpc
    properties:
      cidrBlock: 10.1.0.0/16
  testVpcBlockPublicAccessExclusion:
    type: aws:ec2:VpcBlockPublicAccessExclusion
    name: test
    properties:
      vpcId: ${test.id}
      internetGatewayExclusionMode: allow-bidirectional
Copy

Usage with subnet id

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.ec2.Vpc("test", {cidrBlock: "10.1.0.0/16"});
const testSubnet = new aws.ec2.Subnet("test", {
    cidrBlock: "10.1.1.0/24",
    vpcId: test.id,
});
const testVpcBlockPublicAccessExclusion = new aws.ec2.VpcBlockPublicAccessExclusion("test", {
    subnetId: testSubnet.id,
    internetGatewayExclusionMode: "allow-egress",
});
Copy
import pulumi
import pulumi_aws as aws

test = aws.ec2.Vpc("test", cidr_block="10.1.0.0/16")
test_subnet = aws.ec2.Subnet("test",
    cidr_block="10.1.1.0/24",
    vpc_id=test.id)
test_vpc_block_public_access_exclusion = aws.ec2.VpcBlockPublicAccessExclusion("test",
    subnet_id=test_subnet.id,
    internet_gateway_exclusion_mode="allow-egress")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		test, err := ec2.NewVpc(ctx, "test", &ec2.VpcArgs{
			CidrBlock: pulumi.String("10.1.0.0/16"),
		})
		if err != nil {
			return err
		}
		testSubnet, err := ec2.NewSubnet(ctx, "test", &ec2.SubnetArgs{
			CidrBlock: pulumi.String("10.1.1.0/24"),
			VpcId:     test.ID(),
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcBlockPublicAccessExclusion(ctx, "test", &ec2.VpcBlockPublicAccessExclusionArgs{
			SubnetId:                     testSubnet.ID(),
			InternetGatewayExclusionMode: pulumi.String("allow-egress"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.Ec2.Vpc("test", new()
    {
        CidrBlock = "10.1.0.0/16",
    });

    var testSubnet = new Aws.Ec2.Subnet("test", new()
    {
        CidrBlock = "10.1.1.0/24",
        VpcId = test.Id,
    });

    var testVpcBlockPublicAccessExclusion = new Aws.Ec2.VpcBlockPublicAccessExclusion("test", new()
    {
        SubnetId = testSubnet.Id,
        InternetGatewayExclusionMode = "allow-egress",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.Subnet;
import com.pulumi.aws.ec2.SubnetArgs;
import com.pulumi.aws.ec2.VpcBlockPublicAccessExclusion;
import com.pulumi.aws.ec2.VpcBlockPublicAccessExclusionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new Vpc("test", VpcArgs.builder()
            .cidrBlock("10.1.0.0/16")
            .build());

        var testSubnet = new Subnet("testSubnet", SubnetArgs.builder()
            .cidrBlock("10.1.1.0/24")
            .vpcId(test.id())
            .build());

        var testVpcBlockPublicAccessExclusion = new VpcBlockPublicAccessExclusion("testVpcBlockPublicAccessExclusion", VpcBlockPublicAccessExclusionArgs.builder()
            .subnetId(testSubnet.id())
            .internetGatewayExclusionMode("allow-egress")
            .build());

    }
}
Copy
resources:
  test:
    type: aws:ec2:Vpc
    properties:
      cidrBlock: 10.1.0.0/16
  testSubnet:
    type: aws:ec2:Subnet
    name: test
    properties:
      cidrBlock: 10.1.1.0/24
      vpcId: ${test.id}
  testVpcBlockPublicAccessExclusion:
    type: aws:ec2:VpcBlockPublicAccessExclusion
    name: test
    properties:
      subnetId: ${testSubnet.id}
      internetGatewayExclusionMode: allow-egress
Copy

Create VpcBlockPublicAccessExclusion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VpcBlockPublicAccessExclusion(name: string, args: VpcBlockPublicAccessExclusionArgs, opts?: CustomResourceOptions);
@overload
def VpcBlockPublicAccessExclusion(resource_name: str,
                                  args: VpcBlockPublicAccessExclusionArgs,
                                  opts: Optional[ResourceOptions] = None)

@overload
def VpcBlockPublicAccessExclusion(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  internet_gateway_exclusion_mode: Optional[str] = None,
                                  subnet_id: Optional[str] = None,
                                  tags: Optional[Mapping[str, str]] = None,
                                  timeouts: Optional[VpcBlockPublicAccessExclusionTimeoutsArgs] = None,
                                  vpc_id: Optional[str] = None)
func NewVpcBlockPublicAccessExclusion(ctx *Context, name string, args VpcBlockPublicAccessExclusionArgs, opts ...ResourceOption) (*VpcBlockPublicAccessExclusion, error)
public VpcBlockPublicAccessExclusion(string name, VpcBlockPublicAccessExclusionArgs args, CustomResourceOptions? opts = null)
public VpcBlockPublicAccessExclusion(String name, VpcBlockPublicAccessExclusionArgs args)
public VpcBlockPublicAccessExclusion(String name, VpcBlockPublicAccessExclusionArgs args, CustomResourceOptions options)
type: aws:ec2:VpcBlockPublicAccessExclusion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpcBlockPublicAccessExclusionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpcBlockPublicAccessExclusionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpcBlockPublicAccessExclusionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpcBlockPublicAccessExclusionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcBlockPublicAccessExclusionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var vpcBlockPublicAccessExclusionResource = new Aws.Ec2.VpcBlockPublicAccessExclusion("vpcBlockPublicAccessExclusionResource", new()
{
    InternetGatewayExclusionMode = "string",
    SubnetId = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Timeouts = new Aws.Ec2.Inputs.VpcBlockPublicAccessExclusionTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
    VpcId = "string",
});
Copy
example, err := ec2.NewVpcBlockPublicAccessExclusion(ctx, "vpcBlockPublicAccessExclusionResource", &ec2.VpcBlockPublicAccessExclusionArgs{
	InternetGatewayExclusionMode: pulumi.String("string"),
	SubnetId:                     pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Timeouts: &ec2.VpcBlockPublicAccessExclusionTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
	VpcId: pulumi.String("string"),
})
Copy
var vpcBlockPublicAccessExclusionResource = new VpcBlockPublicAccessExclusion("vpcBlockPublicAccessExclusionResource", VpcBlockPublicAccessExclusionArgs.builder()
    .internetGatewayExclusionMode("string")
    .subnetId("string")
    .tags(Map.of("string", "string"))
    .timeouts(VpcBlockPublicAccessExclusionTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .vpcId("string")
    .build());
Copy
vpc_block_public_access_exclusion_resource = aws.ec2.VpcBlockPublicAccessExclusion("vpcBlockPublicAccessExclusionResource",
    internet_gateway_exclusion_mode="string",
    subnet_id="string",
    tags={
        "string": "string",
    },
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    },
    vpc_id="string")
Copy
const vpcBlockPublicAccessExclusionResource = new aws.ec2.VpcBlockPublicAccessExclusion("vpcBlockPublicAccessExclusionResource", {
    internetGatewayExclusionMode: "string",
    subnetId: "string",
    tags: {
        string: "string",
    },
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
    vpcId: "string",
});
Copy
type: aws:ec2:VpcBlockPublicAccessExclusion
properties:
    internetGatewayExclusionMode: string
    subnetId: string
    tags:
        string: string
    timeouts:
        create: string
        delete: string
        update: string
    vpcId: string
Copy

VpcBlockPublicAccessExclusion Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VpcBlockPublicAccessExclusion resource accepts the following input properties:

InternetGatewayExclusionMode This property is required. string

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

SubnetId string
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
Tags Dictionary<string, string>
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts VpcBlockPublicAccessExclusionTimeouts
VpcId string
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
InternetGatewayExclusionMode This property is required. string

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

SubnetId string
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
Tags map[string]string
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts VpcBlockPublicAccessExclusionTimeoutsArgs
VpcId string
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internetGatewayExclusionMode This property is required. String

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

subnetId String
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags Map<String,String>
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts VpcBlockPublicAccessExclusionTimeouts
vpcId String
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internetGatewayExclusionMode This property is required. string

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

subnetId string
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags {[key: string]: string}
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts VpcBlockPublicAccessExclusionTimeouts
vpcId string
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internet_gateway_exclusion_mode This property is required. str

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

subnet_id str
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags Mapping[str, str]
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts VpcBlockPublicAccessExclusionTimeoutsArgs
vpc_id str
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internetGatewayExclusionMode This property is required. String

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

subnetId String
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags Map<String>
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts Property Map
vpcId String
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcBlockPublicAccessExclusion resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ResourceArn string
The Amazon Resource Name (ARN) the excluded resource.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Id string
The provider-assigned unique ID for this managed resource.
ResourceArn string
The Amazon Resource Name (ARN) the excluded resource.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

id String
The provider-assigned unique ID for this managed resource.
resourceArn String
The Amazon Resource Name (ARN) the excluded resource.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

id string
The provider-assigned unique ID for this managed resource.
resourceArn string
The Amazon Resource Name (ARN) the excluded resource.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

id str
The provider-assigned unique ID for this managed resource.
resource_arn str
The Amazon Resource Name (ARN) the excluded resource.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

id String
The provider-assigned unique ID for this managed resource.
resourceArn String
The Amazon Resource Name (ARN) the excluded resource.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing VpcBlockPublicAccessExclusion Resource

Get an existing VpcBlockPublicAccessExclusion resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VpcBlockPublicAccessExclusionState, opts?: CustomResourceOptions): VpcBlockPublicAccessExclusion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        internet_gateway_exclusion_mode: Optional[str] = None,
        resource_arn: Optional[str] = None,
        subnet_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        timeouts: Optional[VpcBlockPublicAccessExclusionTimeoutsArgs] = None,
        vpc_id: Optional[str] = None) -> VpcBlockPublicAccessExclusion
func GetVpcBlockPublicAccessExclusion(ctx *Context, name string, id IDInput, state *VpcBlockPublicAccessExclusionState, opts ...ResourceOption) (*VpcBlockPublicAccessExclusion, error)
public static VpcBlockPublicAccessExclusion Get(string name, Input<string> id, VpcBlockPublicAccessExclusionState? state, CustomResourceOptions? opts = null)
public static VpcBlockPublicAccessExclusion get(String name, Output<String> id, VpcBlockPublicAccessExclusionState state, CustomResourceOptions options)
resources:  _:    type: aws:ec2:VpcBlockPublicAccessExclusion    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
InternetGatewayExclusionMode string

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

ResourceArn string
The Amazon Resource Name (ARN) the excluded resource.
SubnetId string
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
Tags Dictionary<string, string>
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timeouts VpcBlockPublicAccessExclusionTimeouts
VpcId string
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
InternetGatewayExclusionMode string

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

ResourceArn string
The Amazon Resource Name (ARN) the excluded resource.
SubnetId string
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
Tags map[string]string
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Timeouts VpcBlockPublicAccessExclusionTimeoutsArgs
VpcId string
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internetGatewayExclusionMode String

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

resourceArn String
The Amazon Resource Name (ARN) the excluded resource.
subnetId String
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags Map<String,String>
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts VpcBlockPublicAccessExclusionTimeouts
vpcId String
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internetGatewayExclusionMode string

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

resourceArn string
The Amazon Resource Name (ARN) the excluded resource.
subnetId string
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags {[key: string]: string}
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts VpcBlockPublicAccessExclusionTimeouts
vpcId string
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internet_gateway_exclusion_mode str

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

resource_arn str
The Amazon Resource Name (ARN) the excluded resource.
subnet_id str
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags Mapping[str, str]
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts VpcBlockPublicAccessExclusionTimeoutsArgs
vpc_id str
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.
internetGatewayExclusionMode String

Mode of exclusion from Block Public Access. The allowed values are allow-egress and allow-bidirectional.

The following arguments are optional:

resourceArn String
The Amazon Resource Name (ARN) the excluded resource.
subnetId String
Id of the subnet to which this exclusion applies. Either this or the vpc_id needs to be provided.
tags Map<String>
A map of tags to assign to the exclusion. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

timeouts Property Map
vpcId String
Id of the VPC to which this exclusion applies. Either this or the subnet_id needs to be provided.

Supporting Types

VpcBlockPublicAccessExclusionTimeouts
, VpcBlockPublicAccessExclusionTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Using pulumi import, import EC2 (Elastic Compute Cloud) VPC Block Public Access Exclusion using the id. For example:

$ pulumi import aws:ec2/vpcBlockPublicAccessExclusion:VpcBlockPublicAccessExclusion example vpcbpa-exclude-1234abcd
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.