Get a detailed overview of this resourceList the top 5 use cases for this resourceBuild a program using awsx.ec2.VpcRepository[AWSx (Pulumi AWS Components) pulumi/pulumi-awsx](https://github.com/pulumi/pulumi-awsx)LicenseApache-2.0

1. [Packages](/content/registry/index.html)
2. [Packages](/content/registry/packages/index.html)
3. [AWSx (Pulumi AWS Components)](/content/registry/packages/awsx/index.html)
4. [API Docs](/content/registry/packages/awsx/api-docs/index.html)
5. [ec2](/content/registry/packages/awsx/api-docs/ec2/index.html)
6. [Vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/index.html)

AWSx (Pulumi Crosswalk for AWS) v3.6.0, Jun 5 26

AWSx (Pulumi Crosswalk for AWS) v3.6.0, Jun 5 26

Viewing docs for AWSx (Pulumi Crosswalk for AWS) v3.6.0

published on Friday, Jun 5, 2026 by Pulumi

[Schema (JSON)](/content/registry/packages/awsx/schema.json)

[pulumi/pulumi-awsx](https://github.com/pulumi/pulumi-awsx)

v3.6.0 (3.x, latest)v2.22.0 (2.x)v1.0.6 (1.x)

# awsx.ec2.Vpc [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#awsx-ec2-vpc/index.html)

Explore with Neo

[Explain this resource](https://app.pulumi.com/neo?prompt=Explain+the+resource+awsx.ec2.Vpc.+Provide+a+detailed+overview+of+its+purpose%2C+architecture%2C+and+typical+responsibilities.&prefer_signup=true) [Show real-world scenarios](https://app.pulumi.com/neo?prompt=List+the+top+five+real-world+scenarios+where+awsx.ec2.Vpc+delivers+the+most+value.+Describe+why+it+is+useful+for+each.&prefer_signup=true) [Provision a new instance](https://app.pulumi.com/neo?prompt=Generate+a+Pulumi+program+that+provisions+awsx.ec2.Vpc.+Include+any+required+configuration+and+showcase+best+practices.&prefer_signup=true)

Viewing docs for AWSx (Pulumi Crosswalk for AWS) v3.6.0

published on Friday, Jun 5, 2026 by Pulumi

[Schema (JSON)](/content/registry/packages/awsx/schema.json)

[pulumi/pulumi-awsx](https://github.com/pulumi/pulumi-awsx)

v3.6.0 (3.x, latest)v2.22.0 (2.x)v1.0.6 (1.x)

## On this page

## On this page

- [Subnet Layout Strategies](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet-layout-strategies/index.html)
- [Auto](/content/registry/packages/awsx/api-docs/ec2/vpc/#auto/index.html)
- [AutoMerge](/content/registry/packages/awsx/api-docs/ec2/vpc/#automerge/index.html)
- [Exact](/content/registry/packages/awsx/api-docs/ec2/vpc/#exact/index.html)
- [Explicit CIDR Blocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#explicit-cidr-blocks/index.html)
- [Legacy](/content/registry/packages/awsx/api-docs/ec2/vpc/#legacy/index.html)
- [Example Usage](/content/registry/packages/awsx/api-docs/ec2/vpc/#example-usage/index.html)
- [Create Vpc Resource](/content/registry/packages/awsx/api-docs/ec2/vpc/#create/index.html)
- [Constructor syntax](/content/registry/packages/awsx/api-docs/ec2/vpc/#constructor-syntax/index.html)
- [Constructor example](/content/registry/packages/awsx/api-docs/ec2/vpc/#constructor-example/index.html)
- [Vpc Resource Properties](/content/registry/packages/awsx/api-docs/ec2/vpc/#properties/index.html)
- [Inputs](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html)
- [Outputs](/content/registry/packages/awsx/api-docs/ec2/vpc/#outputs/index.html)
- [Supporting Types](/content/registry/packages/awsx/api-docs/ec2/vpc/#supporting-types/index.html)
- [Package Details](/content/registry/packages/awsx/api-docs/ec2/vpc/#package-details/index.html)

- Copy Page

- [Request a Change](https://github.com/pulumi/registry/issues/new?body=File:%20[themes%2fdefault%2fcontent/%2fregistry%2fpackages%2fawsx%2fapi-docs%2fec2%2fvpc](https%3a%2f%2fwww.pulumi.com%2fregistry%2fpackages%2fawsx%2fapi-docs%2fec2%2fvpc%2f))

[Scroll to top](/content/registry/packages/awsx/api-docs/ec2/vpc/# "Scroll to top"/index.html)

The VPC component provides a VPC with configured subnets and NAT gateways.

## Subnet Layout Strategies [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#subnet-layout-strategies/index.html)

If no subnet arguments are passed, then a public and private subnet will be created in each AZ with default sizing. The layout of these subnets can be customised by specifying additional arguments.

All strategies are designed to help build a uniform layout of subnets each each availability zone.

If no strategy is specified, “Legacy” will be used for backward compatibility reasons. In the next major version this will change to defaulting to “Auto”.

### Auto [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#auto/index.html)

The “Auto” strategy divides the VPC space evenly between the availability zones. Within each availability zone it allocates each subnet in the order they were specified. If a CIDR mask or size was not specified it will default to an even division of the availability zone range. If subnets have different sizes, spaces will be automatically added to ensure subnets don’t overlap (e.g. where a previous subnet is smaller than the next).

### AutoMerge [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#automerge/index.html)

The “AutoMerge” strategy starts from the default auto-generated public/private layout and then merges any user-provided subnet settings into the matching subnet types. This is useful when you want the standard default layout but need to customize one or more default subnet types with tags, IPv6 assignment, or sizing overrides. Explicit `cidrBlocks` layouts are not supported with this strategy; use “Auto” or “Exact” when fully specifying subnet ranges yourself.

### Exact [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#exact/index.html)

The “Exact” strategy is the same as “Auto” with the additional requirement to explicitly specify what the whole of each zone’s range will be used for. Where you expect to have a gap between or after subnets, these must be passed using the subnet specification type “Unused” to show all space has been properly accounted for.

### Explicit CIDR Blocks [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#explicit-cidr-blocks/index.html)

If you prefer to do your CIDR block calculations yourself, you can specify a list of CIDR blocks for each subnet spec which it will be allocated for in each availability zone. If using explicit layouts, all subnet specs must be declared with explicit CIDR blocks. Each list of CIDR blocks must have the same length as the number of availability zones for the VPC.

### Legacy [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#legacy/index.html)

The “Legacy” works similarly to the “Auto” strategy except that within each availability zone it allocates the private subnet first, followed by the public subnets, and lastly the isolated subnets. The order of subnet specifications of the same type can be changed, but the ordering of private, public, isolated is not overridable. For more flexibility we recommend moving to the “Auto” strategy. The output property `subnetLayout` shows the configuration required if specifying the “Auto” strategy to maintain the current layout.

## Example Usage [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#example-usage/index.html)

- TypeScript
- Python
- Go
- C#
- Java
- YAML
- HCL PREVIEW

Basic usage

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Awsx = Pulumi.Awsx;

return await Deployment.RunAsync(() =>
{
    var vpc = new Awsx.Ec2.Vpc("vpc");

return new Dictionary<string, object?>
    {
        ["vpcId"] = vpc.VpcId,
        ["vpcPrivateSubnetIds"] = vpc.PrivateSubnetIds,
        ["vpcPublicSubnetIds"] = vpc.PublicSubnetIds,
    };
});
```

Copy

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		vpc, err := ec2.NewVpc(ctx, "vpc", nil)
		if err != nil {
			return err
		}
		ctx.Export("vpcId", vpc.VpcId)
		ctx.Export("vpcPrivateSubnetIds", vpc.PrivateSubnetIds)
		ctx.Export("vpcPublicSubnetIds", vpc.PublicSubnetIds)
		return nil
	})
}
```

Copy

Example coming soon!

```java
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.awsx.ec2.Vpc;
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 vpc = new Vpc("vpc");

ctx.export("vpcId", vpc.vpcId());
        ctx.export("vpcPrivateSubnetIds", vpc.privateSubnetIds());
        ctx.export("vpcPublicSubnetIds", vpc.publicSubnetIds());
    }
}
```

Copy

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as awsx from "@pulumi/awsx";

const vpc = new awsx.ec2.Vpc("vpc", {});
export const vpcId = vpc.vpcId;
export const vpcPrivateSubnetIds = vpc.privateSubnetIds;
export const vpcPublicSubnetIds = vpc.publicSubnetIds;
```

Copy

```python
import pulumi
import pulumi_awsx as awsx

vpc = awsx.ec2.Vpc("vpc")
pulumi.export("vpcId", vpc.vpc_id)
pulumi.export("vpcPrivateSubnetIds", vpc.private_subnet_ids)
pulumi.export("vpcPublicSubnetIds", vpc.public_subnet_ids)
```

Copy

```yaml
resources:
  vpc:
    type: awsx:ec2:Vpc
outputs:
  vpcId: ${vpc.vpcId}
  vpcPrivateSubnetIds: ${vpc.privateSubnetIds}
  vpcPublicSubnetIds: ${vpc.publicSubnetIds}
```

Copy

## Create Vpc Resource [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#create/index.html)

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see [Resources](/content/docs/concepts/resources/index.html).

### Constructor syntax [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#constructor-syntax/index.html)

- TypeScript
- Python
- Go
- C#
- Java
- YAML
- HCL PREVIEW

```typescript
new Vpc(name: string, args?: VpcArgs, opts?: ComponentResourceOptions);
```

```python
@overload
def Vpc(resource_name: str,
        args: Optional[VpcArgs] = None,
        opts: Optional[ResourceOptions] = None)

@overload
def Vpc(resource_name: str,
        opts: Optional[ResourceOptions] = None,
        assign_generated_ipv6_cidr_block: Optional[bool] = None,
        availability_zone_cidr_mask: Optional[int] = None,
        availability_zone_names: Optional[Sequence[str]] = None,
        cidr_block: Optional[str] = None,
        enable_dns_hostnames: Optional[bool] = None,
        enable_dns_support: Optional[bool] = None,
        enable_network_address_usage_metrics: Optional[bool] = None,
        instance_tenancy: Optional[str] = None,
        ipv4_ipam_pool_id: Optional[str] = None,
        ipv4_netmask_length: Optional[int] = None,
        ipv6_cidr_block: Optional[str] = None,
        ipv6_cidr_block_network_border_group: Optional[str] = None,
        ipv6_ipam_pool_id: Optional[str] = None,
        ipv6_netmask_length: Optional[int] = None,
        nat_gateways: Optional[NatGatewayConfigurationArgs] = None,
        number_of_availability_zones: Optional[int] = None,
        region: Optional[str] = None,
        subnet_specs: Optional[Sequence[SubnetSpecArgs]] = None,
        subnet_strategy: Optional[SubnetAllocationStrategy] = None,
        tags: Optional[Mapping[str, str]] = None,
        vpc_endpoint_specs: Optional[Sequence[VpcEndpointSpecArgs]] = None)
```

```go
func NewVpc(ctx *Context, name string, args *VpcArgs, opts ...ResourceOption) (*Vpc, error)
```

```csharp
public Vpc(string name, VpcArgs? args = null, ComponentResourceOptions? opts = null)
```

```java
public Vpc(String name, VpcArgs args)
public Vpc(String name, VpcArgs args, ComponentResourceOptions options)
```

```yaml
type: awsx:ec2:Vpc
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
```

```hcl
resource "awsx_ec2_vpc" "name" {
    # resource properties
}
```

#### Parameters [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#parameters/index.html)

nameThis property is required.stringThe unique name of the resource.args[VpcArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html)The arguments to resource properties.opts[ComponentResourceOptions](/content/docs/reference/pkg/nodejs/pulumi/pulumi/#ComponentResourceOptions/index.html)Bag of options to control resource's behavior.

resource\_nameThis property is required.strThe unique name of the resource.args[VpcArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html)The arguments to resource properties.opts[ResourceOptions](/content/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions)Bag of options to control resource's behavior.

ctx[Context](https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context)Context object for the current deployment.nameThis property is required.stringThe unique name of the resource.args[VpcArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html)The arguments to resource properties.opts[ResourceOption](https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption)Bag of options to control resource's behavior.

nameThis property is required.stringThe unique name of the resource.args[VpcArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html)The arguments to resource properties.opts[ComponentResourceOptions](/content/docs/reference/pkg/dotnet/Pulumi/Pulumi.ComponentResourceOptions.html)Bag of options to control resource's behavior.

nameThis property is required.StringThe unique name of the resource.argsThis property is required.[VpcArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html)The arguments to resource properties.optionsComponentResourceOptionsBag of options to control resource's behavior.

### Constructor example [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#constructor-example/index.html)

The following reference example uses placeholder values for all [input properties](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html).

- TypeScript
- Python
- Go
- C#
- Java
- YAML
- HCL PREVIEW

```csharp
var vpcResource = new Awsx.Ec2.Vpc("vpcResource", new()
{
    AssignGeneratedIpv6CidrBlock = false,
    AvailabilityZoneCidrMask = 0,
    AvailabilityZoneNames = new()
    {
        "string",
    },
    CidrBlock = "string",
    EnableDnsHostnames = false,
    EnableDnsSupport = false,
    EnableNetworkAddressUsageMetrics = false,
    InstanceTenancy = "string",
    Ipv4IpamPoolId = "string",
    Ipv4NetmaskLength = 0,
    Ipv6CidrBlock = "string",
    Ipv6CidrBlockNetworkBorderGroup = "string",
    Ipv6IpamPoolId = "string",
    Ipv6NetmaskLength = 0,
    NatGateways = new Awsx.Ec2.Inputs.NatGatewayConfigurationArgs
    {
        Strategy = Awsx.Ec2.NatGatewayStrategy.None,
        ElasticIpAllocationIds = new()
        {
            "string",
        },
    },
    NumberOfAvailabilityZones = 0,
    Region = "string",
    SubnetSpecs = new()
    {
        new Awsx.Ec2.Inputs.SubnetSpecArgs
        {
            Type = Awsx.Ec2.SubnetType.Public,
            AssignIpv6AddressOnCreation = false,
            CidrBlocks = new()
            {
                "string",
            },
            CidrMask = 0,
            Name = "string",
            Size = 0,
            Tags =
            {
                { "string", "string" },
            },
        },
    },
    SubnetStrategy = Awsx.Ec2.SubnetAllocationStrategy.Legacy,
    Tags =
    {
        { "string", "string" },
    },
    VpcEndpointSpecs = new()
    {
        new Awsx.Ec2.Inputs.VpcEndpointSpecArgs
        {
            ServiceName = "string",
            SecurityGroupIds = new()
            {
                "string",
            },
            ServiceRegion = "string",
            Policy = "string",
            PrivateDnsEnabled = false,
            Region = "string",
            ResourceConfigurationArn = "string",
            IpAddressType = "string",
            DnsOptions = new Aws.Ec2.Inputs.VpcEndpointDnsOptionsArgs
            {
                DnsRecordIpType = "string",
                PrivateDnsOnlyForInboundResolverEndpoint = false,
                PrivateDnsPreference = "string",
                PrivateDnsSpecifiedDomains = new()
                {
                    "string",
                },
            },
            RouteTableIds = new()
            {
                "string",
            },
            ServiceNetworkArn = "string",
            AutoAccept = false,
            SubnetConfigurations = new()
            {
                new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs
                {
                    Ipv4 = "string",
                    Ipv6 = "string",
                    SubnetId = "string",
                },
            },
            SubnetIds = new()
            {
                "string",
            },
            Tags =
            {
                { "string", "string" },
            },
            VpcEndpointType = "string",
        },
    },
});
```

Copy

```go
example, err := ec2.NewVpc(ctx, "vpcResource", &ec2.VpcArgs{
	AssignGeneratedIpv6CidrBlock: pulumi.Bool(false),
	AvailabilityZoneCidrMask:     0,
	AvailabilityZoneNames: []string{
		"string",
	},
	CidrBlock:                        "string",
	EnableDnsHostnames:               pulumi.Bool(false),
	EnableDnsSupport:                 pulumi.Bool(false),
	EnableNetworkAddressUsageMetrics: pulumi.Bool(false),
	InstanceTenancy:                  pulumi.String("string"),
	Ipv4IpamPoolId:                   pulumi.String("string"),
	Ipv4NetmaskLength:                pulumi.Int(0),
	Ipv6CidrBlock:                    pulumi.String("string"),
	Ipv6CidrBlockNetworkBorderGroup:  pulumi.String("string"),
	Ipv6IpamPoolId:                   pulumi.String("string"),
	Ipv6NetmaskLength:                pulumi.Int(0),
	NatGateways: ec2.NatGatewayConfigurationArgs{
		Strategy: ec2.NatGatewayStrategyNone,
		ElasticIpAllocationIds: []pulumi.String{
			pulumi.String("string"),
		},
	},
	NumberOfAvailabilityZones: 0,
	Region:                    pulumi.String("string"),
	SubnetSpecs: []ec2.SubnetSpecArgs{
		{
			Type:                        ec2.SubnetTypePublic,
			AssignIpv6AddressOnCreation: false,
			CidrBlocks: []string{
				"string",
			},
			CidrMask: 0,
			Name:     "string",
			Size:     0,
			Tags: {
				"string": pulumi.String("string"),
			},
		},
	},
	SubnetStrategy: ec2.SubnetAllocationStrategyLegacy,
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	VpcEndpointSpecs: []ec2.VpcEndpointSpecArgs{
		{
			ServiceName: "string",
			SecurityGroupIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			ServiceRegion:            pulumi.String("string"),
			Policy:                   pulumi.String("string"),
			PrivateDnsEnabled:        false,
			Region:                   pulumi.String("string"),
			ResourceConfigurationArn: pulumi.String("string"),
			IpAddressType:            pulumi.String("string"),
			DnsOptions: {
				DnsRecordIpType:                          pulumi.String("string"),
				PrivateDnsOnlyForInboundResolverEndpoint: pulumi.Bool(false),
				PrivateDnsPreference:                     pulumi.String("string"),
				PrivateDnsSpecifiedDomains: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			RouteTableIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			ServiceNetworkArn: pulumi.String("string"),
			AutoAccept:        false,
			SubnetConfigurations: ec2.VpcEndpointSubnetConfigurationArray{
				{
					Ipv4:     pulumi.String("string"),
					Ipv6:     pulumi.String("string"),
					SubnetId: pulumi.String("string"),
				},
			},
			SubnetIds: pulumi.StringArray{
				pulumi.String("string"),
			},
			Tags: {
				"string": pulumi.String("string"),
			},
			VpcEndpointType: pulumi.String("string"),
		},
	},
})
```

Copy

```hcl
resource "awsx_ec2_vpc" "vpcResource" {
  assign_generated_ipv6_cidr_block     = false
  availability_zone_cidr_mask          = 0
  availability_zone_names              = ["string"]
  cidr_block                           = "string"
  enable_dns_hostnames                 = false
  enable_dns_support                   = false
  enable_network_address_usage_metrics = false
  instance_tenancy                     = "string"
  ipv4_ipam_pool_id                    = "string"
  ipv4_netmask_length                  = 0
  ipv6_cidr_block                      = "string"
  ipv6_cidr_block_network_border_group = "string"
  ipv6_ipam_pool_id                    = "string"
  ipv6_netmask_length                  = 0
  nat_gateways = {
    strategy                  = "None"
    elastic_ip_allocation_ids = ["string"]
  }
  number_of_availability_zones = 0
  region                       = "string"
  subnet_specs {
    type                            = "Public"
    assign_ipv6_address_on_creation = false
    cidr_blocks                     = ["string"]
    cidr_mask                       = 0
    name                            = "string"
    size                            = 0
    tags = {
      "string" = "string"
    }
  }
  subnet_strategy = "Legacy"
  tags = {
    "string" = "string"
  }
  vpc_endpoint_specs {
    service_name               = "string"
    security_group_ids         = ["string"]
    service_region             = "string"
    policy                     = "string"
    private_dns_enabled        = false
    region                     = "string"
    resource_configuration_arn = "string"
    ip_address_type            = "string"
    dns_options = {
      dns_record_ip_type                             = "string"
      private_dns_only_for_inbound_resolver_endpoint = false
      private_dns_preference                         = "string"
      private_dns_specified_domains                  = ["string"]
    }
    route_table_ids     = ["string"]
    service_network_arn = "string"
    auto_accept         = false
    subnet_configurations {
      ipv4      = "string"
      ipv6      = "string"
      subnet_id = "string"
    }
    subnet_ids = ["string"]
    tags = {
      "string" = "string"
    }
    vpc_endpoint_type = "string"
  }
}
```

Copy

```java
var vpcResource = new Vpc("vpcResource", VpcArgs.builder()
    .assignGeneratedIpv6CidrBlock(false)
    .availabilityZoneCidrMask(0)
    .availabilityZoneNames("string")
    .cidrBlock("string")
    .enableDnsHostnames(false)
    .enableDnsSupport(false)
    .enableNetworkAddressUsageMetrics(false)
    .instanceTenancy("string")
    .ipv4IpamPoolId("string")
    .ipv4NetmaskLength(0)
    .ipv6CidrBlock("string")
    .ipv6CidrBlockNetworkBorderGroup("string")
    .ipv6IpamPoolId("string")
    .ipv6NetmaskLength(0)
    .natGateways(NatGatewayConfigurationArgs.builder()
        .strategy("None")
        .elasticIpAllocationIds("string")
        .build())
    .numberOfAvailabilityZones(0)
    .region("string")
    .subnetSpecs(SubnetSpecArgs.builder()
        .type("Public")
        .assignIpv6AddressOnCreation(false)
        .cidrBlocks("string")
        .cidrMask(0)
        .name("string")
        .size(0)
        .tags(Map.of("string", "string"))
        .build())
    .subnetStrategy("Legacy")
    .tags(Map.of("string", "string"))
    .vpcEndpointSpecs(VpcEndpointSpecArgs.builder()
        .serviceName("string")
        .securityGroupIds("string")
        .serviceRegion("string")
        .policy("string")
        .privateDnsEnabled(false)
        .region("string")
        .resourceConfigurationArn("string")
        .ipAddressType("string")
        .dnsOptions(VpcEndpointDnsOptionsArgs.builder()
            .dnsRecordIpType("string")
            .privateDnsOnlyForInboundResolverEndpoint(false)
            .privateDnsPreference("string")
            .privateDnsSpecifiedDomains("string")
            .build())
        .routeTableIds("string")
        .serviceNetworkArn("string")
        .autoAccept(false)
        .subnetConfigurations(VpcEndpointSubnetConfigurationArgs.builder()
            .ipv4("string")
            .ipv6("string")
            .subnetId("string")
            .build())
        .subnetIds("string")
        .tags(Map.of("string", "string"))
        .vpcEndpointType("string")
        .build())
    .build());
```

Copy

```python
vpc_resource = awsx.ec2.Vpc("vpcResource",
    assign_generated_ipv6_cidr_block=False,
    availability_zone_cidr_mask=0,
    availability_zone_names=["string"],
    cidr_block="string",
    enable_dns_hostnames=False,
    enable_dns_support=False,
    enable_network_address_usage_metrics=False,
    instance_tenancy="string",
    ipv4_ipam_pool_id="string",
    ipv4_netmask_length=0,
    ipv6_cidr_block="string",
    ipv6_cidr_block_network_border_group="string",
    ipv6_ipam_pool_id="string",
    ipv6_netmask_length=0,
    nat_gateways={
        "strategy": awsx.ec2.NatGatewayStrategy.NONE,
        "elastic_ip_allocation_ids": ["string"],
    },
    number_of_availability_zones=0,
    region="string",
    subnet_specs=[{\
        "type": awsx.ec2.SubnetType.PUBLIC,\
        "assign_ipv6_address_on_creation": False,\
        "cidr_blocks": ["string"],\
        "cidr_mask": 0,\
        "name": "string",\
        "size": 0,\
        "tags": {\
            "string": "string",\
        },\
    }],
    subnet_strategy=awsx.ec2.SubnetAllocationStrategy.LEGACY,
    tags={
        "string": "string",
    },
    vpc_endpoint_specs=[{\
        "service_name": "string",\
        "security_group_ids": ["string"],\
        "service_region": "string",\
        "policy": "string",\
        "private_dns_enabled": False,\
        "region": "string",\
        "resource_configuration_arn": "string",\
        "ip_address_type": "string",\
        "dns_options": {\
            "dns_record_ip_type": "string",\
            "private_dns_only_for_inbound_resolver_endpoint": False,\
            "private_dns_preference": "string",\
            "private_dns_specified_domains": ["string"],\
        },\
        "route_table_ids": ["string"],\
        "service_network_arn": "string",\
        "auto_accept": False,\
        "subnet_configurations": [{\
            "ipv4": "string",\
            "ipv6": "string",\
            "subnet_id": "string",\
        }],\
        "subnet_ids": ["string"],\
        "tags": {\
            "string": "string",\
        },\
        "vpc_endpoint_type": "string",\
    }])
```

Copy

```typescript
const vpcResource = new awsx.ec2.Vpc("vpcResource", {
    assignGeneratedIpv6CidrBlock: false,
    availabilityZoneCidrMask: 0,
    availabilityZoneNames: ["string"],
    cidrBlock: "string",
    enableDnsHostnames: false,
    enableDnsSupport: false,
    enableNetworkAddressUsageMetrics: false,
    instanceTenancy: "string",
    ipv4IpamPoolId: "string",
    ipv4NetmaskLength: 0,
    ipv6CidrBlock: "string",
    ipv6CidrBlockNetworkBorderGroup: "string",
    ipv6IpamPoolId: "string",
    ipv6NetmaskLength: 0,
    natGateways: {
        strategy: awsx.ec2.NatGatewayStrategy.None,
        elasticIpAllocationIds: ["string"],
    },
    numberOfAvailabilityZones: 0,
    region: "string",
    subnetSpecs: [{\
        type: awsx.ec2.SubnetType.Public,\
        assignIpv6AddressOnCreation: false,\
        cidrBlocks: ["string"],\
        cidrMask: 0,\
        name: "string",\
        size: 0,\
        tags: {\
            string: "string",\
        },\
    }],
    subnetStrategy: awsx.ec2.SubnetAllocationStrategy.Legacy,
    tags: {
        string: "string",
    },
    vpcEndpointSpecs: [{\
        serviceName: "string",\
        securityGroupIds: ["string"],\
        serviceRegion: "string",\
        policy: "string",\
        privateDnsEnabled: false,\
        region: "string",\
        resourceConfigurationArn: "string",\
        ipAddressType: "string",\
        dnsOptions: {\
            dnsRecordIpType: "string",\
            privateDnsOnlyForInboundResolverEndpoint: false,\
            privateDnsPreference: "string",\
            privateDnsSpecifiedDomains: ["string"],\
        },\
        routeTableIds: ["string"],\
        serviceNetworkArn: "string",\
        autoAccept: false,\
        subnetConfigurations: [{\
            ipv4: "string",\
            ipv6: "string",\
            subnetId: "string",\
        }],\
        subnetIds: ["string"],\
        tags: {\
            string: "string",\
        },\
        vpcEndpointType: "string",\
    }],
});
```

Copy

```yaml
type: awsx:ec2:Vpc
properties:
    assignGeneratedIpv6CidrBlock: false
    availabilityZoneCidrMask: 0
    availabilityZoneNames:
        - string
    cidrBlock: string
    enableDnsHostnames: false
    enableDnsSupport: false
    enableNetworkAddressUsageMetrics: false
    instanceTenancy: string
    ipv4IpamPoolId: string
    ipv4NetmaskLength: 0
    ipv6CidrBlock: string
    ipv6CidrBlockNetworkBorderGroup: string
    ipv6IpamPoolId: string
    ipv6NetmaskLength: 0
    natGateways:
        elasticIpAllocationIds:
            - string
        strategy: None
    numberOfAvailabilityZones: 0
    region: string
    subnetSpecs:
        - assignIpv6AddressOnCreation: false
          cidrBlocks:
            - string
          cidrMask: 0
          name: string
          size: 0
          tags:
            string: string
          type: Public
    subnetStrategy: Legacy
    tags:
        string: string
    vpcEndpointSpecs:
        - autoAccept: false
          dnsOptions:
            dnsRecordIpType: string
            privateDnsOnlyForInboundResolverEndpoint: false
            privateDnsPreference: string
            privateDnsSpecifiedDomains:
                - string
          ipAddressType: string
          policy: string
          privateDnsEnabled: false
          region: string
          resourceConfigurationArn: string
          routeTableIds:
            - string
          securityGroupIds:
            - string
          serviceName: string
          serviceNetworkArn: string
          serviceRegion: string
          subnetConfigurations:
            - ipv4: string
              ipv6: string
              subnetId: string
          subnetIds:
            - string
          tags:
            string: string
          vpcEndpointType: string
```

Copy

## Vpc Resource Properties [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#properties/index.html)

To learn more about resource properties and how to use them, see [Inputs and Outputs](/content/docs/intro/concepts/inputs-outputs/index.html) in the Architecture and Concepts docs.

### Inputs [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#inputs/index.html)

In Python, inputs that are objects can be passed either as [argument classes or as dictionary literals](/content/docs/languages-sdks/python/#inputs-and-outputs/index.html).

The Vpc resource accepts the following [input](/content/docs/intro/concepts/inputs-outputs/index.html) properties:

[AssignGeneratedIpv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#assigngeneratedipv6cidrblock_csharp/index.html)boolRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[AvailabilityZoneCidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonecidrmask_csharp/index.html)intThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[AvailabilityZoneNames](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonenames_csharp/index.html)List<string>A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblock_csharp/index.html)stringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[EnableDnsHostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednshostnames_csharp/index.html)boolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[EnableDnsSupport](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednssupport_csharp/index.html)boolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[EnableNetworkAddressUsageMetrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablenetworkaddressusagemetrics_csharp/index.html)boolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[InstanceTenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instancetenancy_csharp/index.html)stringA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[Ipv4IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4ipampoolid_csharp/index.html)Changes to this property will trigger replacement.stringThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[Ipv4NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4netmasklength_csharp/index.html)Changes to this property will trigger replacement.intThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[Ipv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblock_csharp/index.html)stringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[Ipv6CidrBlockNetworkBorderGroup](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblocknetworkbordergroup_csharp/index.html)stringBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[Ipv6IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6ipampoolid_csharp/index.html)stringIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[Ipv6NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6netmasklength_csharp/index.html)intNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[NatGateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgateways_csharp/index.html)[NatGatewayConfiguration](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[NumberOfAvailabilityZones](/content/registry/packages/awsx/api-docs/ec2/vpc/#numberofavailabilityzones_csharp/index.html)intA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[Region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_csharp/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[SubnetSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspecs_csharp/index.html)[List<SubnetSpec>](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[SubnetStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetstrategy_csharp/index.html)[Pulumi.Awsx.Ec2.SubnetAllocationStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[Tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_csharp/index.html)Dictionary<string, string>A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[VpcEndpointSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspecs_csharp/index.html)[List<VpcEndpointSpec>](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

[AssignGeneratedIpv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#assigngeneratedipv6cidrblock_go/index.html)boolRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[AvailabilityZoneCidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonecidrmask_go/index.html)intThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[AvailabilityZoneNames](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonenames_go/index.html)\[\]stringA list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblock_go/index.html)stringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[EnableDnsHostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednshostnames_go/index.html)boolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[EnableDnsSupport](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednssupport_go/index.html)boolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[EnableNetworkAddressUsageMetrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablenetworkaddressusagemetrics_go/index.html)boolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[InstanceTenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instancetenancy_go/index.html)stringA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[Ipv4IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4ipampoolid_go/index.html)Changes to this property will trigger replacement.stringThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[Ipv4NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4netmasklength_go/index.html)Changes to this property will trigger replacement.intThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[Ipv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblock_go/index.html)stringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[Ipv6CidrBlockNetworkBorderGroup](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblocknetworkbordergroup_go/index.html)stringBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[Ipv6IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6ipampoolid_go/index.html)stringIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[Ipv6NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6netmasklength_go/index.html)intNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[NatGateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgateways_go/index.html)[NatGatewayConfigurationArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[NumberOfAvailabilityZones](/content/registry/packages/awsx/api-docs/ec2/vpc/#numberofavailabilityzones_go/index.html)intA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[Region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_go/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[SubnetSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspecs_go/index.html)[\[\]SubnetSpecArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[SubnetStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetstrategy_go/index.html)[SubnetAllocationStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[Tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_go/index.html)map\[string\]stringA map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[VpcEndpointSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspecs_go/index.html)[\[\]VpcEndpointSpecArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

[assign\_generated\_ipv6\_cidr\_block](/content/registry/packages/awsx/api-docs/ec2/vpc/#assign_generated_ipv6_cidr_block_hcl/index.html)boolRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[availability\_zone\_cidr\_mask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availability_zone_cidr_mask_hcl/index.html)numberThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[availability\_zone\_names](/content/registry/packages/awsx/api-docs/ec2/vpc/#availability_zone_names_hcl/index.html)list(string)A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[cidr\_block](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_block_hcl/index.html)stringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[enable\_dns\_hostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enable_dns_hostnames_hcl/index.html)boolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[enable\_dns\_support](/content/registry/packages/awsx/api-docs/ec2/vpc/#enable_dns_support_hcl/index.html)boolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[enable\_network\_address\_usage\_metrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enable_network_address_usage_metrics_hcl/index.html)boolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[instance\_tenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instance_tenancy_hcl/index.html)stringA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[ipv4\_ipam\_pool\_id](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4_ipam_pool_id_hcl/index.html)Changes to this property will trigger replacement.stringThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[ipv4\_netmask\_length](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4_netmask_length_hcl/index.html)Changes to this property will trigger replacement.numberThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[ipv6\_cidr\_block](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_cidr_block_hcl/index.html)stringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[ipv6\_cidr\_block\_network\_border\_group](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_cidr_block_network_border_group_hcl/index.html)stringBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[ipv6\_ipam\_pool\_id](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_ipam_pool_id_hcl/index.html)stringIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[ipv6\_netmask\_length](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_netmask_length_hcl/index.html)numberNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[nat\_gateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#nat_gateways_hcl/index.html)[object](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[number\_of\_availability\_zones](/content/registry/packages/awsx/api-docs/ec2/vpc/#number_of_availability_zones_hcl/index.html)numberA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_hcl/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[subnet\_specs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_specs_hcl/index.html)[list(object)](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[subnet\_strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_strategy_hcl/index.html)["Legacy" \| "Auto" \| "AutoMerge" \| "Exact"](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_hcl/index.html)map(string)A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpc\_endpoint\_specs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_endpoint_specs_hcl/index.html)[list(object)](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

[assignGeneratedIpv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#assigngeneratedipv6cidrblock_java/index.html)BooleanRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[availabilityZoneCidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonecidrmask_java/index.html)IntegerThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[availabilityZoneNames](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonenames_java/index.html)List<String>A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[cidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblock_java/index.html)StringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[enableDnsHostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednshostnames_java/index.html)BooleanA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[enableDnsSupport](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednssupport_java/index.html)BooleanA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[enableNetworkAddressUsageMetrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablenetworkaddressusagemetrics_java/index.html)BooleanIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[instanceTenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instancetenancy_java/index.html)StringA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[ipv4IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4ipampoolid_java/index.html)Changes to this property will trigger replacement.StringThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[ipv4NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4netmasklength_java/index.html)Changes to this property will trigger replacement.IntegerThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[ipv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblock_java/index.html)StringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[ipv6CidrBlockNetworkBorderGroup](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblocknetworkbordergroup_java/index.html)StringBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[ipv6IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6ipampoolid_java/index.html)StringIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[ipv6NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6netmasklength_java/index.html)IntegerNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[natGateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgateways_java/index.html)[NatGatewayConfiguration](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[numberOfAvailabilityZones](/content/registry/packages/awsx/api-docs/ec2/vpc/#numberofavailabilityzones_java/index.html)IntegerA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_java/index.html)StringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[subnetSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspecs_java/index.html)[List<SubnetSpec>](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[subnetStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetstrategy_java/index.html)[SubnetAllocationStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_java/index.html)Map<String,String>A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpcEndpointSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspecs_java/index.html)[List<VpcEndpointSpec>](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

[assignGeneratedIpv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#assigngeneratedipv6cidrblock_nodejs/index.html)booleanRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[availabilityZoneCidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonecidrmask_nodejs/index.html)numberThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[availabilityZoneNames](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonenames_nodejs/index.html)string\[\]A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[cidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblock_nodejs/index.html)stringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[enableDnsHostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednshostnames_nodejs/index.html)booleanA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[enableDnsSupport](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednssupport_nodejs/index.html)booleanA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[enableNetworkAddressUsageMetrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablenetworkaddressusagemetrics_nodejs/index.html)booleanIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[instanceTenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instancetenancy_nodejs/index.html)stringA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[ipv4IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4ipampoolid_nodejs/index.html)Changes to this property will trigger replacement.stringThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[ipv4NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4netmasklength_nodejs/index.html)Changes to this property will trigger replacement.numberThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[ipv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblock_nodejs/index.html)stringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[ipv6CidrBlockNetworkBorderGroup](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblocknetworkbordergroup_nodejs/index.html)stringBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[ipv6IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6ipampoolid_nodejs/index.html)stringIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[ipv6NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6netmasklength_nodejs/index.html)numberNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[natGateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgateways_nodejs/index.html)[NatGatewayConfiguration](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[numberOfAvailabilityZones](/content/registry/packages/awsx/api-docs/ec2/vpc/#numberofavailabilityzones_nodejs/index.html)numberA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_nodejs/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[subnetSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspecs_nodejs/index.html)[SubnetSpec\[\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[subnetStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetstrategy_nodejs/index.html)[SubnetAllocationStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_nodejs/index.html){\[key: string\]: string}A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpcEndpointSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspecs_nodejs/index.html)[VpcEndpointSpec\[\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

[assign\_generated\_ipv6\_cidr\_block](/content/registry/packages/awsx/api-docs/ec2/vpc/#assign_generated_ipv6_cidr_block_python/index.html)boolRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[availability\_zone\_cidr\_mask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availability_zone_cidr_mask_python/index.html)intThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[availability\_zone\_names](/content/registry/packages/awsx/api-docs/ec2/vpc/#availability_zone_names_python/index.html)Sequence\[str\]A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[cidr\_block](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_block_python/index.html)strThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[enable\_dns\_hostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enable_dns_hostnames_python/index.html)boolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[enable\_dns\_support](/content/registry/packages/awsx/api-docs/ec2/vpc/#enable_dns_support_python/index.html)boolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[enable\_network\_address\_usage\_metrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enable_network_address_usage_metrics_python/index.html)boolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[instance\_tenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instance_tenancy_python/index.html)strA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[ipv4\_ipam\_pool\_id](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4_ipam_pool_id_python/index.html)Changes to this property will trigger replacement.strThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[ipv4\_netmask\_length](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4_netmask_length_python/index.html)Changes to this property will trigger replacement.intThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[ipv6\_cidr\_block](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_cidr_block_python/index.html)strIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[ipv6\_cidr\_block\_network\_border\_group](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_cidr_block_network_border_group_python/index.html)strBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[ipv6\_ipam\_pool\_id](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_ipam_pool_id_python/index.html)strIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[ipv6\_netmask\_length](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6_netmask_length_python/index.html)intNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[nat\_gateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#nat_gateways_python/index.html)[NatGatewayConfigurationArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[number\_of\_availability\_zones](/content/registry/packages/awsx/api-docs/ec2/vpc/#number_of_availability_zones_python/index.html)intA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_python/index.html)strRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[subnet\_specs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_specs_python/index.html)[Sequence\[SubnetSpecArgs\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[subnet\_strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_strategy_python/index.html)[SubnetAllocationStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_python/index.html)Mapping\[str, str\]A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpc\_endpoint\_specs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_endpoint_specs_python/index.html)[Sequence\[VpcEndpointSpecArgs\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

[assignGeneratedIpv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#assigngeneratedipv6cidrblock_yaml/index.html)BooleanRequests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId`[availabilityZoneCidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonecidrmask_yaml/index.html)NumberThe netmask for each available zone to be aligned to. This is optional, the default value is inferred based on an even distribution of available space from the VPC's CIDR block after being divided evenly by the number of availability zones.[availabilityZoneNames](/content/registry/packages/awsx/api-docs/ec2/vpc/#availabilityzonenames_yaml/index.html)List<String>A list of availability zone names to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[cidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblock_yaml/index.html)StringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.[enableDnsHostnames](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednshostnames_yaml/index.html)BooleanA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.[enableDnsSupport](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablednssupport_yaml/index.html)BooleanA boolean flag to enable/disable DNS support in the VPC. Defaults to true.[enableNetworkAddressUsageMetrics](/content/registry/packages/awsx/api-docs/ec2/vpc/#enablenetworkaddressusagemetrics_yaml/index.html)BooleanIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.[instanceTenancy](/content/registry/packages/awsx/api-docs/ec2/vpc/#instancetenancy_yaml/index.html)StringA tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee.[ipv4IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4ipampoolid_yaml/index.html)Changes to this property will trigger replacement.StringThe ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization.[ipv4NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv4netmasklength_yaml/index.html)Changes to this property will trigger replacement.NumberThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`.[ipv6CidrBlock](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblock_yaml/index.html)StringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`.[ipv6CidrBlockNetworkBorderGroup](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6cidrblocknetworkbordergroup_yaml/index.html)StringBy default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.[ipv6IpamPoolId](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6ipampoolid_yaml/index.html)StringIPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`.[ipv6NetmaskLength](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipv6netmasklength_yaml/index.html)NumberNetmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values are from `44` to `60` in increments of 4.[natGateways](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgateways_yaml/index.html)[Property Map](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewayconfiguration/index.html)Configuration for NAT Gateways. Optional. If private and public subnets are both specified, defaults to one gateway per availability zone. Otherwise, no gateways will be created.[numberOfAvailabilityZones](/content/registry/packages/awsx/api-docs/ec2/vpc/#numberofavailabilityzones_yaml/index.html)NumberA number of availability zones to which the subnets defined in subnetSpecs will be deployed. Optional, defaults to the first 3 AZs in the current region.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_yaml/index.html)StringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[subnetSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspecs_yaml/index.html)[List<Property Map>](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetspec/index.html)A list of subnet specs that should be deployed to each AZ specified in availabilityZoneNames. Optional. Defaults to a (smaller) public subnet and a (larger) private subnet based on the size of the CIDR block for the VPC. Private subnets are allocated CIDR block ranges first, followed by Public subnets, and Isolated subnets are allocated last.[subnetStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetstrategy_yaml/index.html)["Legacy" \| "Auto" \| "AutoMerge" \| "Exact"](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetallocationstrategy/index.html)The strategy to use when allocating subnets for the VPC. Optional. Defaults to `Legacy`.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_yaml/index.html)Map<String>A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpcEndpointSpecs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspecs_yaml/index.html)[List<Property Map>](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointspec/index.html)A list of VPC Endpoints specs to be deployed as part of the VPC

### Outputs [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#outputs/index.html)

All [input](/content/registry/packages/awsx/api-docs/ec2/vpc/#inputs/index.html) properties are implicitly available as output properties. Additionally, the Vpc resource produces the following output properties:

[AwsVpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#awsvpc_csharp/index.html)Pulumi.Aws.Ec2.VpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[Eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_csharp/index.html)List<Pulumi.Aws.Ec2.Eip>The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[InternetGateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internetgateway_csharp/index.html)Pulumi.Aws.Ec2.InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[IsolatedSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnetids_csharp/index.html)List<string>[IsolatedSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnets_csharp/index.html)List<Pulumi.Aws.Ec2.Subnet>The VPC's isolated subnets.[PrivateSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnetids_csharp/index.html)List<string>[PrivateSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnets_csharp/index.html)List<Pulumi.Aws.Ec2.Subnet>The VPC's private subnets.[PublicSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnetids_csharp/index.html)List<string>[PublicSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnets_csharp/index.html)List<Pulumi.Aws.Ec2.Subnet>The VPC's public subnets.[RouteTableAssociations](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableassociations_csharp/index.html)List<Pulumi.Aws.Ec2.RouteTableAssociation>The Route Table Associations for the VPC.[RouteTables](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetables_csharp/index.html)List<Pulumi.Aws.Ec2.RouteTable>The Route Tables for the VPC.[Routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_csharp/index.html)List<Pulumi.Aws.Ec2.Route>The Routes for the VPC.[SubnetLayout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetlayout_csharp/index.html)[List<ResolvedSubnetSpec>](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[Subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_csharp/index.html)List<Pulumi.Aws.Ec2.Subnet>The VPC's subnets.[VpcEndpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpoints_csharp/index.html)List<Pulumi.Aws.Ec2.VpcEndpoint>The VPC Endpoints that are enabled[VpcId](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcid_csharp/index.html)string

[Eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_go/index.html)EipThe EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[InternetGateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internetgateway_go/index.html)InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[IsolatedSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnetids_go/index.html)\[\]string[IsolatedSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnets_go/index.html)SubnetThe VPC's isolated subnets.[PrivateSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnetids_go/index.html)\[\]string[PrivateSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnets_go/index.html)SubnetThe VPC's private subnets.[PublicSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnetids_go/index.html)\[\]string[PublicSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnets_go/index.html)SubnetThe VPC's public subnets.[RouteTableAssociations](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableassociations_go/index.html)RouteTableAssociationThe Route Table Associations for the VPC.[RouteTables](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetables_go/index.html)RouteTableThe Route Tables for the VPC.[Routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_go/index.html)RouteThe Routes for the VPC.[SubnetLayout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetlayout_go/index.html)[\[\]ResolvedSubnetSpec](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[Subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_go/index.html)SubnetThe VPC's subnets.[Vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_go/index.html)VpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[VpcEndpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpoints_go/index.html)VpcEndpointThe VPC Endpoints that are enabled[VpcId](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcid_go/index.html)string

[eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_hcl/index.html)list(aws\_ec2\_eip\_eip)The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[internet\_gateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internet_gateway_hcl/index.html)aws\_ec2\_internetgateway\_internetgatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[isolated\_subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolated_subnet_ids_hcl/index.html)list(string)[isolated\_subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolated_subnets_hcl/index.html)list(aws\_ec2\_subnet\_subnet)The VPC's isolated subnets.[private\_subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#private_subnet_ids_hcl/index.html)list(string)[private\_subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#private_subnets_hcl/index.html)list(aws\_ec2\_subnet\_subnet)The VPC's private subnets.[public\_subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#public_subnet_ids_hcl/index.html)list(string)[public\_subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#public_subnets_hcl/index.html)list(aws\_ec2\_subnet\_subnet)The VPC's public subnets.[route\_table\_associations](/content/registry/packages/awsx/api-docs/ec2/vpc/#route_table_associations_hcl/index.html)list(aws\_ec2\_routetableassociation\_routetableassociation)The Route Table Associations for the VPC.[route\_tables](/content/registry/packages/awsx/api-docs/ec2/vpc/#route_tables_hcl/index.html)list(aws\_ec2\_routetable\_routetable)The Route Tables for the VPC.[routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_hcl/index.html)list(aws\_ec2\_route\_route)The Routes for the VPC.[subnet\_layout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_layout_hcl/index.html)[list(object)](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_hcl/index.html)list(aws\_ec2\_subnet\_subnet)The VPC's subnets.[vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_hcl/index.html)aws\_ec2\_vpc\_vpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[vpc\_endpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_endpoints_hcl/index.html)list(aws\_ec2\_vpcendpoint\_vpcendpoint)The VPC Endpoints that are enabled[vpc\_id](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_id_hcl/index.html)string

[eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_java/index.html)List<Eip>The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[internetGateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internetgateway_java/index.html)InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[isolatedSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnetids_java/index.html)List<String>[isolatedSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnets_java/index.html)List<Subnet>The VPC's isolated subnets.[privateSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnetids_java/index.html)List<String>[privateSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnets_java/index.html)List<Subnet>The VPC's private subnets.[publicSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnetids_java/index.html)List<String>[publicSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnets_java/index.html)List<Subnet>The VPC's public subnets.[routeTableAssociations](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableassociations_java/index.html)List<RouteTableAssociation>The Route Table Associations for the VPC.[routeTables](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetables_java/index.html)List<RouteTable>The Route Tables for the VPC.[routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_java/index.html)List<Route>The Routes for the VPC.[subnetLayout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetlayout_java/index.html)[List<ResolvedSubnetSpec>](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_java/index.html)List<Subnet>The VPC's subnets.[vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_java/index.html)VpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[vpcEndpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpoints_java/index.html)List<VpcEndpoint>The VPC Endpoints that are enabled[vpcId](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcid_java/index.html)String

[eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_nodejs/index.html)pulumiAws.Eip\[\]The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[internetGateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internetgateway_nodejs/index.html)pulumiAws.InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[isolatedSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnetids_nodejs/index.html)string\[\][isolatedSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnets_nodejs/index.html)pulumiAws.Subnet\[\]The VPC's isolated subnets.[privateSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnetids_nodejs/index.html)string\[\][privateSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnets_nodejs/index.html)pulumiAws.Subnet\[\]The VPC's private subnets.[publicSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnetids_nodejs/index.html)string\[\][publicSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnets_nodejs/index.html)pulumiAws.Subnet\[\]The VPC's public subnets.[routeTableAssociations](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableassociations_nodejs/index.html)pulumiAws.RouteTableAssociation\[\]The Route Table Associations for the VPC.[routeTables](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetables_nodejs/index.html)pulumiAws.RouteTable\[\]The Route Tables for the VPC.[routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_nodejs/index.html)pulumiAws.Route\[\]The Routes for the VPC.[subnetLayout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetlayout_nodejs/index.html)[ResolvedSubnetSpec\[\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_nodejs/index.html)pulumiAws.Subnet\[\]The VPC's subnets.[vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_nodejs/index.html)pulumiAws.VpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[vpcEndpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpoints_nodejs/index.html)pulumiAws.VpcEndpoint\[\]The VPC Endpoints that are enabled[vpcId](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcid_nodejs/index.html)string

[eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_python/index.html)Sequence\[pulumi\_aws.ec2.Eip\]The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[internet\_gateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internet_gateway_python/index.html)pulumi\_aws.ec2.InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[isolated\_subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolated_subnet_ids_python/index.html)Sequence\[str\][isolated\_subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolated_subnets_python/index.html)Sequence\[pulumi\_aws.ec2.Subnet\]The VPC's isolated subnets.[private\_subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#private_subnet_ids_python/index.html)Sequence\[str\][private\_subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#private_subnets_python/index.html)Sequence\[pulumi\_aws.ec2.Subnet\]The VPC's private subnets.[public\_subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#public_subnet_ids_python/index.html)Sequence\[str\][public\_subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#public_subnets_python/index.html)Sequence\[pulumi\_aws.ec2.Subnet\]The VPC's public subnets.[route\_table\_associations](/content/registry/packages/awsx/api-docs/ec2/vpc/#route_table_associations_python/index.html)Sequence\[pulumi\_aws.ec2.RouteTableAssociation\]The Route Table Associations for the VPC.[route\_tables](/content/registry/packages/awsx/api-docs/ec2/vpc/#route_tables_python/index.html)Sequence\[pulumi\_aws.ec2.RouteTable\]The Route Tables for the VPC.[routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_python/index.html)Sequence\[pulumi\_aws.ec2.Route\]The Routes for the VPC.[subnet\_layout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_layout_python/index.html)[Sequence\[ResolvedSubnetSpec\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_python/index.html)Sequence\[pulumi\_aws.ec2.Subnet\]The VPC's subnets.[vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_python/index.html)pulumi\_aws.ec2.VpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[vpc\_endpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_endpoints_python/index.html)Sequence\[pulumi\_aws.ec2.VpcEndpoint\]The VPC Endpoints that are enabled[vpc\_id](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_id_python/index.html)str

[eips](/content/registry/packages/awsx/api-docs/ec2/vpc/#eips_yaml/index.html)List<aws::Eip>The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.[internetGateway](/content/registry/packages/awsx/api-docs/ec2/vpc/#internetgateway_yaml/index.html)aws::InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[isolatedSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnetids_yaml/index.html)List<String>[isolatedSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#isolatedsubnets_yaml/index.html)List<aws::Subnet>The VPC's isolated subnets.[privateSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnetids_yaml/index.html)List<String>[privateSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatesubnets_yaml/index.html)List<aws::Subnet>The VPC's private subnets.[publicSubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnetids_yaml/index.html)List<String>[publicSubnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#publicsubnets_yaml/index.html)List<aws::Subnet>The VPC's public subnets.[routeTableAssociations](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableassociations_yaml/index.html)List<aws::RouteTableAssociation>The Route Table Associations for the VPC.[routeTables](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetables_yaml/index.html)List<aws::RouteTable>The Route Tables for the VPC.[routes](/content/registry/packages/awsx/api-docs/ec2/vpc/#routes_yaml/index.html)List<aws::Route>The Routes for the VPC.[subnetLayout](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetlayout_yaml/index.html)[List<Property Map>](/content/registry/packages/awsx/api-docs/ec2/vpc/#resolvedsubnetspec/index.html)The resolved subnet specs layout deployed to each availability zone.[subnets](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnets_yaml/index.html)List<aws::Subnet>The VPC's subnets.[vpc](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_yaml/index.html)aws::VpcThe VPC.
This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.[vpcEndpoints](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpoints_yaml/index.html)List<aws::VpcEndpoint>The VPC Endpoints that are enabled[vpcId](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcid_yaml/index.html)String

## Supporting Types [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#supporting-types/index.html)

#### NatGatewayConfiguration  , NatGatewayConfigurationArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#natgatewayconfiguration/index.html)

Configuration for NAT Gateways.

[Strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_csharp/index.html)This property is required.[Pulumi.Awsx.Ec2.NatGatewayStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[ElasticIpAllocationIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#elasticipallocationids_csharp/index.html)List<string>A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

[Strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_go/index.html)This property is required.[NatGatewayStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[ElasticIpAllocationIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#elasticipallocationids_go/index.html)\[\]stringA list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

[strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_hcl/index.html)This property is required.["None" \| "Single" \| "OnePerAz"](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[elastic\_ip\_allocation\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#elastic_ip_allocation_ids_hcl/index.html)list(string)A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

[strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_java/index.html)This property is required.[NatGatewayStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[elasticIpAllocationIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#elasticipallocationids_java/index.html)List<String>A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

[strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_nodejs/index.html)This property is required.[NatGatewayStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[elasticIpAllocationIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#elasticipallocationids_nodejs/index.html)string\[\]A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

[strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_python/index.html)This property is required.[NatGatewayStrategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[elastic\_ip\_allocation\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#elastic_ip_allocation_ids_python/index.html)Sequence\[str\]A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

[strategy](/content/registry/packages/awsx/api-docs/ec2/vpc/#strategy_yaml/index.html)This property is required.["None" \| "Single" \| "OnePerAz"](/content/registry/packages/awsx/api-docs/ec2/vpc/#natgatewaystrategy/index.html)The strategy for deploying NAT Gateways.[elasticIpAllocationIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#elasticipallocationids_yaml/index.html)List<String>A list of EIP allocation IDs to assign to the NAT Gateways. Optional. If specified, the number of supplied values must match the chosen strategy (either one, or the number of availability zones).

#### NatGatewayStrategy  , NatGatewayStrategyArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#natgatewaystrategy/index.html)

None`None` Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.Single`Single` Create a single NAT Gateway for the entire VPC. This configuration is not recommended for production infrastructure as it creates a single point of failure.OnePerAz`OnePerAz` Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure.

NatGatewayStrategyNone`None` Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.NatGatewayStrategySingle`Single` Create a single NAT Gateway for the entire VPC. This configuration is not recommended for production infrastructure as it creates a single point of failure.NatGatewayStrategyOnePerAz`OnePerAz` Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure.

"None"`None` Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet."Single"`Single` Create a single NAT Gateway for the entire VPC. This configuration is not recommended for production infrastructure as it creates a single point of failure."OnePerAz"`OnePerAz` Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure.

NONE`None` Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.SINGLE`Single` Create a single NAT Gateway for the entire VPC. This configuration is not recommended for production infrastructure as it creates a single point of failure.ONE\_PER\_AZ`OnePerAz` Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure.

#### ResolvedSubnetSpec  , ResolvedSubnetSpecArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#resolvedsubnetspec/index.html)

Configuration for a VPC subnet spec.

[Type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_csharp/index.html)This property is required.[Pulumi.Awsx.Ec2.SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[CidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_csharp/index.html)List<string>An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[CidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_csharp/index.html)intThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[Name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_csharp/index.html)stringThe subnet's name. Will be templated upon creation.[Size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_csharp/index.html)intOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

[Type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_go/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[CidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_go/index.html)\[\]stringAn optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[CidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_go/index.html)intThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[Name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_go/index.html)stringThe subnet's name. Will be templated upon creation.[Size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_go/index.html)intOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_hcl/index.html)This property is required.["Public" \| "Private" \| "Isolated" \| "Unused"](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[cidr\_blocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_blocks_hcl/index.html)list(string)An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidr\_mask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_mask_hcl/index.html)numberThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_hcl/index.html)stringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_hcl/index.html)numberOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_java/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[cidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_java/index.html)List<String>An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_java/index.html)IntegerThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_java/index.html)StringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_java/index.html)IntegerOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_nodejs/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[cidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_nodejs/index.html)string\[\]An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_nodejs/index.html)numberThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_nodejs/index.html)stringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_nodejs/index.html)numberOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_python/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[cidr\_blocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_blocks_python/index.html)Sequence\[str\]An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidr\_mask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_mask_python/index.html)intThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_python/index.html)strThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_python/index.html)intOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_yaml/index.html)This property is required.["Public" \| "Private" \| "Isolated" \| "Unused"](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[cidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_yaml/index.html)List<String>An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_yaml/index.html)NumberThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_yaml/index.html)StringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_yaml/index.html)NumberOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.

#### SubnetAllocationStrategy  , SubnetAllocationStrategyArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#subnetallocationstrategy/index.html)

Legacy`Legacy` Group private subnets first, followed by public subnets, followed by isolated subnets.Auto`Auto` Order remains as specified by specs, allowing gaps where required.AutoMerge`AutoMerge` Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types.Exact`Exact` Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.

SubnetAllocationStrategyLegacy`Legacy` Group private subnets first, followed by public subnets, followed by isolated subnets.SubnetAllocationStrategyAuto`Auto` Order remains as specified by specs, allowing gaps where required.SubnetAllocationStrategyAutoMerge`AutoMerge` Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types.SubnetAllocationStrategyExact`Exact` Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.

"Legacy"`Legacy` Group private subnets first, followed by public subnets, followed by isolated subnets."Auto"`Auto` Order remains as specified by specs, allowing gaps where required."AutoMerge"`AutoMerge` Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types."Exact"`Exact` Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.

LEGACY`Legacy` Group private subnets first, followed by public subnets, followed by isolated subnets.AUTO`Auto` Order remains as specified by specs, allowing gaps where required.AUTO\_MERGE`AutoMerge` Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types.EXACT`Exact` Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.

#### SubnetSpec  , SubnetSpecArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#subnetspec/index.html)

Configuration for a VPC subnet.

[Type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_csharp/index.html)This property is required.[Pulumi.Awsx.Ec2.SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[AssignIpv6AddressOnCreation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assignipv6addressoncreation_csharp/index.html)boolIndicates whether a network interface created in this subnet receives an IPv6 address.[CidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_csharp/index.html)List<string>An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[CidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_csharp/index.html)intThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[Name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_csharp/index.html)stringThe subnet's name. Will be templated upon creation.[Size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_csharp/index.html)intOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[Tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_csharp/index.html)Dictionary<string, string>A map of tags to assign to the resource.

[Type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_go/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[AssignIpv6AddressOnCreation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assignipv6addressoncreation_go/index.html)boolIndicates whether a network interface created in this subnet receives an IPv6 address.[CidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_go/index.html)\[\]stringAn optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[CidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_go/index.html)intThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[Name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_go/index.html)stringThe subnet's name. Will be templated upon creation.[Size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_go/index.html)intOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[Tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_go/index.html)map\[string\]stringA map of tags to assign to the resource.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_hcl/index.html)This property is required.["Public" \| "Private" \| "Isolated" \| "Unused"](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[assign\_ipv6\_address\_on\_creation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assign_ipv6_address_on_creation_hcl/index.html)boolIndicates whether a network interface created in this subnet receives an IPv6 address.[cidr\_blocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_blocks_hcl/index.html)list(string)An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidr\_mask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_mask_hcl/index.html)numberThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_hcl/index.html)stringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_hcl/index.html)numberOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_hcl/index.html)map(string)A map of tags to assign to the resource.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_java/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[assignIpv6AddressOnCreation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assignipv6addressoncreation_java/index.html)BooleanIndicates whether a network interface created in this subnet receives an IPv6 address.[cidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_java/index.html)List<String>An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_java/index.html)IntegerThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_java/index.html)StringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_java/index.html)IntegerOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_java/index.html)Map<String,String>A map of tags to assign to the resource.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_nodejs/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[assignIpv6AddressOnCreation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assignipv6addressoncreation_nodejs/index.html)booleanIndicates whether a network interface created in this subnet receives an IPv6 address.[cidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_nodejs/index.html)string\[\]An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_nodejs/index.html)numberThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_nodejs/index.html)stringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_nodejs/index.html)numberOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_nodejs/index.html){\[key: string\]: string}A map of tags to assign to the resource.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_python/index.html)This property is required.[SubnetType](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[assign\_ipv6\_address\_on\_creation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assign_ipv6_address_on_creation_python/index.html)boolIndicates whether a network interface created in this subnet receives an IPv6 address.[cidr\_blocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_blocks_python/index.html)Sequence\[str\]An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidr\_mask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidr_mask_python/index.html)intThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_python/index.html)strThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_python/index.html)intOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_python/index.html)Mapping\[str, str\]A map of tags to assign to the resource.

[type](/content/registry/packages/awsx/api-docs/ec2/vpc/#type_yaml/index.html)This property is required.["Public" \| "Private" \| "Isolated" \| "Unused"](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnettype/index.html)The type of subnet.[assignIpv6AddressOnCreation](/content/registry/packages/awsx/api-docs/ec2/vpc/#assignipv6addressoncreation_yaml/index.html)BooleanIndicates whether a network interface created in this subnet receives an IPv6 address.[cidrBlocks](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrblocks_yaml/index.html)List<String>An optional list of CIDR blocks to assign to the subnet spec for each AZ. If specified, the count must match the number of AZs being used for the VPC, and must also be specified for all other subnet specs.[cidrMask](/content/registry/packages/awsx/api-docs/ec2/vpc/#cidrmask_yaml/index.html)NumberThe netmask for the subnet's CIDR block. This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[name](/content/registry/packages/awsx/api-docs/ec2/vpc/#name_yaml/index.html)StringThe subnet's name. Will be templated upon creation.[size](/content/registry/packages/awsx/api-docs/ec2/vpc/#size_yaml/index.html)NumberOptional size of the subnet's CIDR block - the number of hosts. This value must be a power of 2 (e.g. 256, 512, 1024, etc.). This is optional, the default value is inferred from the `cidrMask`, `cidrBlocks` or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_yaml/index.html)Map<String>A map of tags to assign to the resource.

#### SubnetType  , SubnetTypeArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#subnettype/index.html)

Public`Public` A subnet whose hosts can directly communicate with the internet.Private`Private` A subnet whose hosts can not directly communicate with the internet, but can initiate outbound network traffic via a NAT Gateway.Isolated`Isolated` A subnet whose hosts have no connectivity with the internet.Unused`Unused` A subnet range which is reserved, but no subnet will be created.

SubnetTypePublic`Public` A subnet whose hosts can directly communicate with the internet.SubnetTypePrivate`Private` A subnet whose hosts can not directly communicate with the internet, but can initiate outbound network traffic via a NAT Gateway.SubnetTypeIsolated`Isolated` A subnet whose hosts have no connectivity with the internet.SubnetTypeUnused`Unused` A subnet range which is reserved, but no subnet will be created.

"Public"`Public` A subnet whose hosts can directly communicate with the internet."Private"`Private` A subnet whose hosts can not directly communicate with the internet, but can initiate outbound network traffic via a NAT Gateway."Isolated"`Isolated` A subnet whose hosts have no connectivity with the internet."Unused"`Unused` A subnet range which is reserved, but no subnet will be created.

#### VpcEndpointSpec  , VpcEndpointSpecArgs   [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#vpcendpointspec/index.html)

Provides a VPC Endpoint resource.

> **NOTE on VPC Endpoints and VPC Endpoint Associations:** The provider provides both standalone VPC Endpoint Associations for
> Route Tables - (an association between a VPC endpoint and a single `routeTableId`),
> Security Groups - (an association between a VPC endpoint and a single `securityGroupId`),
> and Subnets - (an association between a VPC endpoint and a single `subnetId`) and
> a VPC Endpoint resource with `routeTableIds` and `subnetIds` attributes.
> Do not use the same resource ID in both a VPC Endpoint resource and a VPC Endpoint Association resource.
> Doing so will cause a conflict of associations and will overwrite the association.

## Example Usage [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#example-usage-1/index.html)

### Basic [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#basic/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const s3 = new aws.ec2.VpcEndpoint("s3", {
vpcId: main.id,
serviceName: "com.amazonaws.us-west-2.s3",
});
```

```python
import pulumi
import pulumi_aws as aws

s3 = aws.ec2.VpcEndpoint("s3",
    vpc_id=main["id"],
    service_name="com.amazonaws.us-west-2.s3")
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var s3 = new Aws.Ec2.VpcEndpoint("s3", new()
    {
        VpcId = main.Id,
        ServiceName = "com.amazonaws.us-west-2.s3",
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "s3", &ec2.VpcEndpointArgs{
			VpcId:       pulumi.Any(main.Id),
			ServiceName: pulumi.String("com.amazonaws.us-west-2.s3"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "s3" {
  vpc_id       = main.id
  service_name = "com.amazonaws.us-west-2.s3"
}
```

```java
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcEndpoint;
import com.pulumi.aws.ec2.VpcEndpointArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 s3 = new VpcEndpoint("s3", VpcEndpointArgs.builder()
            .vpcId(main.id())
            .serviceName("com.amazonaws.us-west-2.s3")
            .build());

}
}
```

```yaml
resources:
  s3:
    type: aws:ec2:VpcEndpoint
    properties:
      vpcId: ${main.id}
      serviceName: com.amazonaws.us-west-2.s3
```

### Basic w/ Tags [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#basic-w-tags/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const s3 = new aws.ec2.VpcEndpoint("s3", {
vpcId: main.id,
serviceName: "com.amazonaws.us-west-2.s3",
tags: {
Environment: "test",
},
});
```

```python
import pulumi
import pulumi_aws as aws

s3 = aws.ec2.VpcEndpoint("s3",
    vpc_id=main["id"],
    service_name="com.amazonaws.us-west-2.s3",
    tags={
        "Environment": "test",
    })
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var s3 = new Aws.Ec2.VpcEndpoint("s3", new()
    {
        VpcId = main.Id,
        ServiceName = "com.amazonaws.us-west-2.s3",
        Tags =
        {
            { "Environment", "test" },
        },
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "s3", &ec2.VpcEndpointArgs{
			VpcId:       pulumi.Any(main.Id),
			ServiceName: pulumi.String("com.amazonaws.us-west-2.s3"),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("test"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "s3" {
  vpc_id       = main.id
  service_name = "com.amazonaws.us-west-2.s3"
  tags = {
    "Environment" = "test"
  }
}
```

```java
package generated_program;

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

public static void stack(Context ctx) {
        var s3 = new VpcEndpoint("s3", VpcEndpointArgs.builder()
            .vpcId(main.id())
            .serviceName("com.amazonaws.us-west-2.s3")
            .tags(Map.of("Environment", "test"))
            .build());

}
}
```

```yaml
resources:
  s3:
    type: aws:ec2:VpcEndpoint
    properties:
      vpcId: ${main.id}
      serviceName: com.amazonaws.us-west-2.s3
      tags:
        Environment: test
```

### Cross-region enabled AWS services [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#cross-region-enabled-aws-services/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const s3 = new aws.ec2.VpcEndpoint("s3", {
region: "us-west-2",
vpcId: main.id,
serviceName: "com.amazonaws.us-east-2.s3",
serviceRegion: "us-east-2",
tags: {
Environment: "test",
},
});
```

```python
import pulumi
import pulumi_aws as aws

s3 = aws.ec2.VpcEndpoint("s3",
    region="us-west-2",
    vpc_id=main["id"],
    service_name="com.amazonaws.us-east-2.s3",
    service_region="us-east-2",
    tags={
        "Environment": "test",
    })
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var s3 = new Aws.Ec2.VpcEndpoint("s3", new()
    {
        Region = "us-west-2",
        VpcId = main.Id,
        ServiceName = "com.amazonaws.us-east-2.s3",
        ServiceRegion = "us-east-2",
        Tags =
        {
            { "Environment", "test" },
        },
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "s3", &ec2.VpcEndpointArgs{
			Region:        pulumi.String("us-west-2"),
			VpcId:         pulumi.Any(main.Id),
			ServiceName:   pulumi.String("com.amazonaws.us-east-2.s3"),
			ServiceRegion: pulumi.String("us-east-2"),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("test"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "s3" {
  region         = "us-west-2"
  vpc_id         = main.id
  service_name   = "com.amazonaws.us-east-2.s3"
  service_region = "us-east-2"
  tags = {
    "Environment" = "test"
  }
}
```

```java
package generated_program;

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

public static void stack(Context ctx) {
        var s3 = new VpcEndpoint("s3", VpcEndpointArgs.builder()
            .region("us-west-2")
            .vpcId(main.id())
            .serviceName("com.amazonaws.us-east-2.s3")
            .serviceRegion("us-east-2")
            .tags(Map.of("Environment", "test"))
            .build());

}
}
```

```yaml
resources:
  s3:
    type: aws:ec2:VpcEndpoint
    properties:
      region: us-west-2
      vpcId: ${main.id}
      serviceName: com.amazonaws.us-east-2.s3
      serviceRegion: us-east-2
      tags:
        Environment: test
```

### Interface Endpoint Type [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#interface-endpoint-type/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ec2 = new aws.ec2.VpcEndpoint("ec2", {
vpcId: main.id,
serviceName: "com.amazonaws.us-west-2.ec2",
vpcEndpointType: "Interface",
securityGroupIds: [sg1.id],
privateDnsEnabled: true,
});
```

```python
import pulumi
import pulumi_aws as aws

ec2 = aws.ec2.VpcEndpoint("ec2",
    vpc_id=main["id"],
    service_name="com.amazonaws.us-west-2.ec2",
    vpc_endpoint_type="Interface",
    security_group_ids=[sg1["id"]],
    private_dns_enabled=True)
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var ec2 = new Aws.Ec2.VpcEndpoint("ec2", new()
    {
        VpcId = main.Id,
        ServiceName = "com.amazonaws.us-west-2.ec2",
        VpcEndpointType = "Interface",
        SecurityGroupIds = new[]
        {
            sg1.Id,
        },
        PrivateDnsEnabled = true,
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "ec2", &ec2.VpcEndpointArgs{
			VpcId:           pulumi.Any(main.Id),
			ServiceName:     pulumi.String("com.amazonaws.us-west-2.ec2"),
			VpcEndpointType: pulumi.String("Interface"),
			SecurityGroupIds: pulumi.StringArray{
				sg1.Id,
			},
			PrivateDnsEnabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "ec2" {
  vpc_id              = main.id
  service_name        = "com.amazonaws.us-west-2.ec2"
  vpc_endpoint_type   = "Interface"
  security_group_ids  = [sg1.id]
  private_dns_enabled = true
}
```

```java
package generated_program;

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

public static void stack(Context ctx) {
        var ec2 = new VpcEndpoint("ec2", VpcEndpointArgs.builder()
            .vpcId(main.id())
            .serviceName("com.amazonaws.us-west-2.ec2")
            .vpcEndpointType("Interface")
            .securityGroupIds(sg1.id())
            .privateDnsEnabled(true)
            .build());

}
}
```

```yaml
resources:
  ec2:
    type: aws:ec2:VpcEndpoint
    properties:
      vpcId: ${main.id}
      serviceName: com.amazonaws.us-west-2.ec2
      vpcEndpointType: Interface
      securityGroupIds:
        - ${sg1.id}
      privateDnsEnabled: true
```

### Interface Endpoint Type with User-Defined IP Address [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#interface-endpoint-type-with-user-defined-ip-address/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ec2 = new aws.ec2.VpcEndpoint("ec2", {
vpcId: example.id,
serviceName: "com.amazonaws.us-west-2.ec2",
vpcEndpointType: "Interface",
subnetConfigurations: [\
{\
ipv4: "10.0.1.10",\
subnetId: example1.id,\
},\
{\
ipv4: "10.0.2.10",\
subnetId: example2.id,\
},\
],
subnetIds: [\
example1.id,\
example2.id,\
],
});
```

```python
import pulumi
import pulumi_aws as aws

ec2 = aws.ec2.VpcEndpoint("ec2",
    vpc_id=example["id"],
    service_name="com.amazonaws.us-west-2.ec2",
    vpc_endpoint_type="Interface",
    subnet_configurations=[\
        {\
            "ipv4": "10.0.1.10",\
            "subnet_id": example1["id"],\
        },\
        {\
            "ipv4": "10.0.2.10",\
            "subnet_id": example2["id"],\
        },\
    ],
    subnet_ids=[\
        example1["id"],\
        example2["id"],\
    ])
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var ec2 = new Aws.Ec2.VpcEndpoint("ec2", new()
    {
        VpcId = example.Id,
        ServiceName = "com.amazonaws.us-west-2.ec2",
        VpcEndpointType = "Interface",
        SubnetConfigurations = new[]
        {
            new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs
            {
                Ipv4 = "10.0.1.10",
                SubnetId = example1.Id,
            },
            new Aws.Ec2.Inputs.VpcEndpointSubnetConfigurationArgs
            {
                Ipv4 = "10.0.2.10",
                SubnetId = example2.Id,
            },
        },
        SubnetIds = new[]
        {
            example1.Id,
            example2.Id,
        },
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "ec2", &ec2.VpcEndpointArgs{
			VpcId:           pulumi.Any(example.Id),
			ServiceName:     pulumi.String("com.amazonaws.us-west-2.ec2"),
			VpcEndpointType: pulumi.String("Interface"),
			SubnetConfigurations: ec2.VpcEndpointSubnetConfigurationArray{
				&ec2.VpcEndpointSubnetConfigurationArgs{
					Ipv4:     pulumi.String("10.0.1.10"),
					SubnetId: pulumi.Any(example1.Id),
				},
				&ec2.VpcEndpointSubnetConfigurationArgs{
					Ipv4:     pulumi.String("10.0.2.10"),
					SubnetId: pulumi.Any(example2.Id),
				},
			},
			SubnetIds: pulumi.StringArray{
				example1.Id,
				example2.Id,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "ec2" {
  vpc_id            = example.id
  service_name      = "com.amazonaws.us-west-2.ec2"
  vpc_endpoint_type = "Interface"
  subnet_configurations {
    ipv4      = "10.0.1.10"
    subnet_id = example1.id
  }
  subnet_configurations {
    ipv4      = "10.0.2.10"
    subnet_id = example2.id
  }
  subnet_ids = [example1.id, example2.id]
}
```

```java
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcEndpoint;
import com.pulumi.aws.ec2.VpcEndpointArgs;
import com.pulumi.aws.ec2.inputs.VpcEndpointSubnetConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ec2 = new VpcEndpoint("ec2", VpcEndpointArgs.builder()
            .vpcId(example.id())
            .serviceName("com.amazonaws.us-west-2.ec2")
            .vpcEndpointType("Interface")
            .subnetConfigurations(
                VpcEndpointSubnetConfigurationArgs.builder()
                    .ipv4("10.0.1.10")
                    .subnetId(example1.id())
                    .build(),
                VpcEndpointSubnetConfigurationArgs.builder()
                    .ipv4("10.0.2.10")
                    .subnetId(example2.id())
                    .build())
            .subnetIds(
                example1.id(),
                example2.id())
            .build());

}
}
```

```yaml
resources:
  ec2:
    type: aws:ec2:VpcEndpoint
    properties:
      vpcId: ${example.id}
      serviceName: com.amazonaws.us-west-2.ec2
      vpcEndpointType: Interface
      subnetConfigurations:
        - ipv4: 10.0.1.10
          subnetId: ${example1.id}
        - ipv4: 10.0.2.10
          subnetId: ${example2.id}
      subnetIds:
        - ${example1.id}
        - ${example2.id}
```

### Gateway Load Balancer Endpoint Type [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#gateway-load-balancer-endpoint-type/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.getCallerIdentity({});
const example = new aws.ec2.VpcEndpointService("example", {
acceptanceRequired: false,
allowedPrincipals: [current.then(current => current.arn)],
gatewayLoadBalancerArns: [exampleAwsLb.arn],
});
const exampleVpcEndpoint = new aws.ec2.VpcEndpoint("example", {
serviceName: example.serviceName,
subnetIds: [exampleAwsSubnet.id],
vpcEndpointType: example.serviceType,
vpcId: exampleAwsVpc.id,
});
```

```python
import pulumi
import pulumi_aws as aws

current = aws.get_caller_identity()
example = aws.ec2.VpcEndpointService("example",
    acceptance_required=False,
    allowed_principals=[current.arn],
    gateway_load_balancer_arns=[example_aws_lb["arn"]])
example_vpc_endpoint = aws.ec2.VpcEndpoint("example",
    service_name=example.service_name,
    subnet_ids=[example_aws_subnet["id"]],
    vpc_endpoint_type=example.service_type,
    vpc_id=example_aws_vpc["id"])
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var current = Aws.GetCallerIdentity.Invoke();

var example = new Aws.Ec2.VpcEndpointService("example", new()
    {
        AcceptanceRequired = false,
        AllowedPrincipals = new[]
        {
            current.Apply(getCallerIdentityResult => getCallerIdentityResult.Arn),
        },
        GatewayLoadBalancerArns = new[]
        {
            exampleAwsLb.Arn,
        },
    });

var exampleVpcEndpoint = new Aws.Ec2.VpcEndpoint("example", new()
    {
        ServiceName = example.ServiceName,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        VpcEndpointType = example.ServiceType,
        VpcId = exampleAwsVpc.Id,
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
		if err != nil {
			return err
		}
		example, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
			AcceptanceRequired: pulumi.Bool(false),
			AllowedPrincipals: pulumi.StringArray{
				pulumi.String(pulumi.String(current.Arn)),
			},
			GatewayLoadBalancerArns: pulumi.StringArray{
				exampleAwsLb.Arn,
			},
		})
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcEndpoint(ctx, "example", &ec2.VpcEndpointArgs{
			ServiceName: example.ServiceName,
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			VpcEndpointType: example.ServiceType,
			VpcId:           pulumi.Any(exampleAwsVpc.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_getcalleridentity" "current" {
}

resource "aws_ec2_vpcendpointservice" "example" {
  acceptance_required        = false
  allowed_principals         = [data.aws_getcalleridentity.current.arn]
  gateway_load_balancer_arns = [exampleAwsLb.arn]
}
resource "aws_ec2_vpcendpoint" "example" {
  service_name      = aws_ec2_vpcendpointservice.example.service_name
  subnet_ids        = [exampleAwsSubnet.id]
  vpc_endpoint_type = aws_ec2_vpcendpointservice.example.service_type
  vpc_id            = exampleAwsVpc.id
}
```

```java
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.ec2.VpcEndpointService;
import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
import com.pulumi.aws.ec2.VpcEndpoint;
import com.pulumi.aws.ec2.VpcEndpointArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
        final var current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
            .build());

var example = new VpcEndpointService("example", VpcEndpointServiceArgs.builder()
            .acceptanceRequired(false)
            .allowedPrincipals(current.arn())
            .gatewayLoadBalancerArns(exampleAwsLb.arn())
            .build());

var exampleVpcEndpoint = new VpcEndpoint("exampleVpcEndpoint", VpcEndpointArgs.builder()
            .serviceName(example.serviceName())
            .subnetIds(exampleAwsSubnet.id())
            .vpcEndpointType(example.serviceType())
            .vpcId(exampleAwsVpc.id())
            .build());

}
}
```

```yaml
resources:
  example:
    type: aws:ec2:VpcEndpointService
    properties:
      acceptanceRequired: false
      allowedPrincipals:
        - ${current.arn}
      gatewayLoadBalancerArns:
        - ${exampleAwsLb.arn}
  exampleVpcEndpoint:
    type: aws:ec2:VpcEndpoint
    name: example
    properties:
      serviceName: ${example.serviceName}
      subnetIds:
        - ${exampleAwsSubnet.id}
      vpcEndpointType: ${example.serviceType}
      vpcId: ${exampleAwsVpc.id}
variables:
  current:
    fn::invoke:
      function: aws:getCallerIdentity
      arguments: {}
```

### VPC Lattice Resource Configuration Endpoint Type [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#vpc-lattice-resource-configuration-endpoint-type/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpoint("example", {
resourceConfigurationArn: exampleAwsVpclatticeResourceConfiguration.arn,
subnetIds: [exampleAwsSubnet.id],
vpcEndpointType: "Resource",
vpcId: exampleAwsVpc.id,
});
```

```python
import pulumi
import pulumi_aws as aws

example = aws.ec2.VpcEndpoint("example",
    resource_configuration_arn=example_aws_vpclattice_resource_configuration["arn"],
    subnet_ids=[example_aws_subnet["id"]],
    vpc_endpoint_type="Resource",
    vpc_id=example_aws_vpc["id"])
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Ec2.VpcEndpoint("example", new()
    {
        ResourceConfigurationArn = exampleAwsVpclatticeResourceConfiguration.Arn,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        VpcEndpointType = "Resource",
        VpcId = exampleAwsVpc.Id,
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "example", &ec2.VpcEndpointArgs{
			ResourceConfigurationArn: pulumi.Any(exampleAwsVpclatticeResourceConfiguration.Arn),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			VpcEndpointType: pulumi.String("Resource"),
			VpcId:           pulumi.Any(exampleAwsVpc.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "example" {
  resource_configuration_arn = exampleAwsVpclatticeResourceConfiguration.arn
  subnet_ids                 = [exampleAwsSubnet.id]
  vpc_endpoint_type          = "Resource"
  vpc_id                     = exampleAwsVpc.id
}
```

```java
package generated_program;

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

public static void stack(Context ctx) {
        var example = new VpcEndpoint("example", VpcEndpointArgs.builder()
            .resourceConfigurationArn(exampleAwsVpclatticeResourceConfiguration.arn())
            .subnetIds(exampleAwsSubnet.id())
            .vpcEndpointType("Resource")
            .vpcId(exampleAwsVpc.id())
            .build());

}
}
```

```yaml
resources:
  example:
    type: aws:ec2:VpcEndpoint
    properties:
      resourceConfigurationArn: ${exampleAwsVpclatticeResourceConfiguration.arn}
      subnetIds:
        - ${exampleAwsSubnet.id}
      vpcEndpointType: Resource
      vpcId: ${exampleAwsVpc.id}
```

### VPC Lattice Service Network Endpoint Type [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#vpc-lattice-service-network-endpoint-type/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.VpcEndpoint("example", {
serviceNetworkArn: exampleAwsVpclatticeServiceNetwork.arn,
subnetIds: [exampleAwsSubnet.id],
vpcEndpointType: "ServiceNetwork",
vpcId: exampleAwsVpc.id,
});
```

```python
import pulumi
import pulumi_aws as aws

example = aws.ec2.VpcEndpoint("example",
    service_network_arn=example_aws_vpclattice_service_network["arn"],
    subnet_ids=[example_aws_subnet["id"]],
    vpc_endpoint_type="ServiceNetwork",
    vpc_id=example_aws_vpc["id"])
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.Ec2.VpcEndpoint("example", new()
    {
        ServiceNetworkArn = exampleAwsVpclatticeServiceNetwork.Arn,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        VpcEndpointType = "ServiceNetwork",
        VpcId = exampleAwsVpc.Id,
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewVpcEndpoint(ctx, "example", &ec2.VpcEndpointArgs{
			ServiceNetworkArn: pulumi.Any(exampleAwsVpclatticeServiceNetwork.Arn),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			VpcEndpointType: pulumi.String("ServiceNetwork"),
			VpcId:           pulumi.Any(exampleAwsVpc.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_ec2_vpcendpoint" "example" {
  service_network_arn = exampleAwsVpclatticeServiceNetwork.arn
  subnet_ids          = [exampleAwsSubnet.id]
  vpc_endpoint_type   = "ServiceNetwork"
  vpc_id              = exampleAwsVpc.id
}
```

```java
package generated_program;

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

public static void stack(Context ctx) {
        var example = new VpcEndpoint("example", VpcEndpointArgs.builder()
            .serviceNetworkArn(exampleAwsVpclatticeServiceNetwork.arn())
            .subnetIds(exampleAwsSubnet.id())
            .vpcEndpointType("ServiceNetwork")
            .vpcId(exampleAwsVpc.id())
            .build());

}
}
```

```yaml
resources:
  example:
    type: aws:ec2:VpcEndpoint
    properties:
      serviceNetworkArn: ${exampleAwsVpclatticeServiceNetwork.arn}
      subnetIds:
        - ${exampleAwsSubnet.id}
      vpcEndpointType: ServiceNetwork
      vpcId: ${exampleAwsVpc.id}
```

### Non-AWS Service [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#non-aws-service/index.html)

```typescript
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ptfeService = new aws.ec2.VpcEndpoint("ptfe_service", {
vpcId: vpcId,
serviceName: ptfeServiceConfig,
vpcEndpointType: "Interface",
securityGroupIds: [ptfeServiceAwsSecurityGroup.id],
subnetIds: [subnetIds],
privateDnsEnabled: false,
});
const internal = aws.route53.getZone({
name: "vpc.internal.",
privateZone: true,
vpcId: vpcId,
});
const ptfeServiceRecord = new aws.route53.Record("ptfe_service", {
zoneId: internal.then(internal => internal.zoneId),
name: internal.then(internal => ptfe.${internal.name}),
type: aws.route53.RecordType.CNAME,
ttl: 300,
records: [ptfeService.dnsEntries[0].dns_name],
});
```

```python
import pulumi
import pulumi_aws as aws

ptfe_service = aws.ec2.VpcEndpoint("ptfe_service",
    vpc_id=vpc_id,
    service_name=ptfe_service_config,
    vpc_endpoint_type="Interface",
    security_group_ids=[ptfe_service_aws_security_group["id"]],
    subnet_ids=[subnet_ids],
    private_dns_enabled=False)
internal = aws.route53.get_zone(name="vpc.internal.",
    private_zone=True,
    vpc_id=vpc_id)
ptfe_service_record = aws.route53.Record("ptfe_service",
    zone_id=internal.zone_id,
    name=f"ptfe.{internal.name}",
    type=aws.route53.RecordType.CNAME,
    ttl=300,
    records=[ptfe_service.dns_entries[0].dns_name.apply(lambda x: str(x))])
```

```csharp
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var ptfeService = new Aws.Ec2.VpcEndpoint("ptfe_service", new()
    {
        VpcId = vpcId,
        ServiceName = ptfeServiceConfig,
        VpcEndpointType = "Interface",
        SecurityGroupIds = new[]
        {
            ptfeServiceAwsSecurityGroup.Id,
        },
        SubnetIds = new[]
        {
            subnetIds,
        },
        PrivateDnsEnabled = false,
    });

var @internal = Aws.Route53.GetZone.Invoke(new()
    {
        Name = "vpc.internal.",
        PrivateZone = true,
        VpcId = vpcId,
    });

var ptfeServiceRecord = new Aws.Route53.Record("ptfe_service", new()
    {
        ZoneId = @internal.Apply(@internal => @internal.Apply(getZoneResult => getZoneResult.ZoneId)),
        Name = @internal.Apply(@internal => $"ptfe.{@internal.Apply(getZoneResult => getZoneResult.Name)}"),
        Type = Aws.Route53.RecordType.CNAME,
        Ttl = 300,
        Records = new[]
        {
            ptfeService.DnsEntries.Apply(dnsEntries => dnsEntries[0].Dns_name),
        },
    });

});
```

```go
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ptfeService, err := ec2.NewVpcEndpoint(ctx, "ptfe_service", &ec2.VpcEndpointArgs{
			VpcId:           pulumi.Any(vpcId),
			ServiceName:     pulumi.Any(ptfeServiceConfig),
			VpcEndpointType: pulumi.String("Interface"),
			SecurityGroupIds: pulumi.StringArray{
				ptfeServiceAwsSecurityGroup.Id,
			},
			SubnetIds: pulumi.StringArray{
				subnetIds,
			},
			PrivateDnsEnabled: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		internal, err := route53.LookupZone(ctx, &route53.LookupZoneArgs{
			Name:        pulumi.StringRef("vpc.internal."),
			PrivateZone: pulumi.BoolRef(true),
			VpcId:       pulumi.StringRef(vpcId),
		}, nil)
		if err != nil {
			return err
		}
		_, err = route53.NewRecord(ctx, "ptfe_service", &route53.RecordArgs{
			ZoneId: pulumi.String(pulumi.String(internal.ZoneId)),
			Name:   pulumi.Sprintf("ptfe.%v", internal.Name),
			Type:   pulumi.String(route53.RecordTypeCNAME),
			Ttl:    pulumi.Int(300),
			Records: pulumi.StringArray{
				pulumi.String(ptfeService.DnsEntries.ApplyT(func(dnsEntries []ec2.VpcEndpointDnsEntry) (interface{}, error) {
					return dnsEntries[0].Dns_name, nil
				}).(pulumi.AnyOutput)),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
```

```hcl
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_route53_getzone" "internal" {
  name         = "vpc.internal."
  private_zone = true
  vpc_id       = vpcId
}

resource "aws_ec2_vpcendpoint" "ptfe_service" {
  vpc_id              = vpcId
  service_name        = ptfeServiceConfig
  vpc_endpoint_type   = "Interface"
  security_group_ids  = [ptfeServiceAwsSecurityGroup.id]
  subnet_ids          = [subnetIds]
  private_dns_enabled = false
}
resource "aws_route53_record" "ptfe_service" {
  zone_id = data.aws_route53_getzone.internal.zone_id
  name    ="ptfe.${data.aws_route53_getzone.internal.name}"
  type    = "CNAME"
  ttl     = "300"
  records = [aws_ec2_vpcendpoint.ptfe_service.dns_entries[0]["dns_name"]]
}
```

```java
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcEndpoint;
import com.pulumi.aws.ec2.VpcEndpointArgs;
import com.pulumi.aws.route53.Route53Functions;
import com.pulumi.aws.route53.inputs.GetZoneArgs;
import com.pulumi.aws.route53.Record;
import com.pulumi.aws.route53.RecordArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ptfeService = new VpcEndpoint("ptfeService", VpcEndpointArgs.builder()
            .vpcId(vpcId)
            .serviceName(ptfeServiceConfig)
            .vpcEndpointType("Interface")
            .securityGroupIds(ptfeServiceAwsSecurityGroup.id())
            .subnetIds(subnetIds)
            .privateDnsEnabled(false)
            .build());

final var internal = Route53Functions.getZone(GetZoneArgs.builder()
            .name("vpc.internal.")
            .privateZone(true)
            .vpcId(vpcId)
            .build());

var ptfeServiceRecord = new Record("ptfeServiceRecord", RecordArgs.builder()
            .zoneId(internal.zoneId())
            .name(String.format("ptfe.%s", internal.name()))
            .type("CNAME")
            .ttl(300)
            .records(ptfeService.dnsEntries().applyValue(_dnsEntries -> _dnsEntries[0].dns_name()))
            .build());

}
}
```

```yaml
resources:
  ptfeService:
    type: aws:ec2:VpcEndpoint
    name: ptfe_service
    properties:
      vpcId: ${vpcId}
      serviceName: ${ptfeServiceConfig}
      vpcEndpointType: Interface
      securityGroupIds:
        - ${ptfeServiceAwsSecurityGroup.id}
      subnetIds:
        - ${subnetIds}
      privateDnsEnabled: false
  ptfeServiceRecord:
    type: aws:route53:Record
    name: ptfe_service
    properties:
      zoneId: ${internal.zoneId}
      name: ptfe.${internal.name}
      type: CNAME
      ttl: '300'
      records:
        - ${ptfeService.dnsEntries[0].dns_name}
variables:
  internal:
    fn::invoke:
      function: aws:route53:getZone
      arguments:
        name: vpc.internal.
        privateZone: true
        vpcId: ${vpcId}
```

> **NOTE The `dnsEntry` output is a list of maps:** This provider interpolation support for lists of maps requires the `lookup` and `[]` until full support of lists of maps is available

## Import [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#import/index.html)

### Identity Schema [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#identity-schema/index.html)

#### Required [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#required/index.html)

- `id` \- (String) ID of the VPC endpoint.

#### Optional [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#optional/index.html)

- `accountId` (String) AWS Account where this resource is managed.
- `region` (String) Region where this resource is managed.

Using `pulumi import`, import VPC Endpoints using the VPC endpoint `id`. For example:

```sh
$ pulumi import aws:ec2/vpcEndpoint:VpcEndpoint example vpce-3ecf2a57
```

[ServiceName](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicename_csharp/index.html)This property is required.stringThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[AutoAccept](/content/registry/packages/awsx/api-docs/ec2/vpc/#autoaccept_csharp/index.html)boolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[DnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#dnsoptions_csharp/index.html)[Pulumi.Aws.Ec2.Inputs.VpcEndpointDnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[IpAddressType](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipaddresstype_csharp/index.html)stringThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[Policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_csharp/index.html)stringA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[PrivateDnsEnabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatednsenabled_csharp/index.html)boolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[Region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_csharp/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[ResourceConfigurationArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resourceconfigurationarn_csharp/index.html)Changes to this property will trigger replacement.stringThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[RouteTableIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableids_csharp/index.html)List<string>One or more route table IDs. Applicable for endpoints of type `Gateway`.[SecurityGroupIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#securitygroupids_csharp/index.html)List<string>The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[ServiceNetworkArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicenetworkarn_csharp/index.html)Changes to this property will trigger replacement.stringThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[ServiceRegion](/content/registry/packages/awsx/api-docs/ec2/vpc/#serviceregion_csharp/index.html)Changes to this property will trigger replacement.stringThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[SubnetConfigurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetconfigurations_csharp/index.html)[List<Pulumi.Aws.Ec2.Inputs.VpcEndpointSubnetConfiguration>](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[SubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetids_csharp/index.html)List<string>The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[Tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_csharp/index.html)Dictionary<string, string>A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[VpcEndpointType](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointtype_csharp/index.html)Changes to this property will trigger replacement.stringThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

[ServiceName](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicename_go/index.html)This property is required.stringThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[AutoAccept](/content/registry/packages/awsx/api-docs/ec2/vpc/#autoaccept_go/index.html)boolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[DnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#dnsoptions_go/index.html)[VpcEndpointDnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[IpAddressType](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipaddresstype_go/index.html)stringThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[Policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_go/index.html)stringA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[PrivateDnsEnabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatednsenabled_go/index.html)boolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[Region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_go/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[ResourceConfigurationArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resourceconfigurationarn_go/index.html)Changes to this property will trigger replacement.stringThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[RouteTableIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableids_go/index.html)\[\]stringOne or more route table IDs. Applicable for endpoints of type `Gateway`.[SecurityGroupIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#securitygroupids_go/index.html)\[\]stringThe ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[ServiceNetworkArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicenetworkarn_go/index.html)Changes to this property will trigger replacement.stringThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[ServiceRegion](/content/registry/packages/awsx/api-docs/ec2/vpc/#serviceregion_go/index.html)Changes to this property will trigger replacement.stringThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[SubnetConfigurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetconfigurations_go/index.html)[VpcEndpointSubnetConfiguration](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[SubnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetids_go/index.html)\[\]stringThe ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[Tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_go/index.html)map\[string\]stringA map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[VpcEndpointType](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointtype_go/index.html)Changes to this property will trigger replacement.stringThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

[service\_name](/content/registry/packages/awsx/api-docs/ec2/vpc/#service_name_hcl/index.html)This property is required.stringThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[auto\_accept](/content/registry/packages/awsx/api-docs/ec2/vpc/#auto_accept_hcl/index.html)boolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[dns\_options](/content/registry/packages/awsx/api-docs/ec2/vpc/#dns_options_hcl/index.html)[object](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[ip\_address\_type](/content/registry/packages/awsx/api-docs/ec2/vpc/#ip_address_type_hcl/index.html)stringThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_hcl/index.html)stringA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[private\_dns\_enabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#private_dns_enabled_hcl/index.html)boolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_hcl/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[resource\_configuration\_arn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resource_configuration_arn_hcl/index.html)Changes to this property will trigger replacement.stringThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[route\_table\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#route_table_ids_hcl/index.html)list(string)One or more route table IDs. Applicable for endpoints of type `Gateway`.[security\_group\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#security_group_ids_hcl/index.html)list(string)The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[service\_network\_arn](/content/registry/packages/awsx/api-docs/ec2/vpc/#service_network_arn_hcl/index.html)Changes to this property will trigger replacement.stringThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[service\_region](/content/registry/packages/awsx/api-docs/ec2/vpc/#service_region_hcl/index.html)Changes to this property will trigger replacement.stringThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[subnet\_configurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_configurations_hcl/index.html)[list(object)](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_ids_hcl/index.html)list(string)The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_hcl/index.html)map(string)A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpc\_endpoint\_type](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_endpoint_type_hcl/index.html)Changes to this property will trigger replacement.stringThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

[serviceName](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicename_java/index.html)This property is required.StringThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[autoAccept](/content/registry/packages/awsx/api-docs/ec2/vpc/#autoaccept_java/index.html)BooleanAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[dnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#dnsoptions_java/index.html)[VpcEndpointDnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[ipAddressType](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipaddresstype_java/index.html)StringThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_java/index.html)StringA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[privateDnsEnabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatednsenabled_java/index.html)BooleanWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_java/index.html)StringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[resourceConfigurationArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resourceconfigurationarn_java/index.html)Changes to this property will trigger replacement.StringThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[routeTableIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableids_java/index.html)List<String>One or more route table IDs. Applicable for endpoints of type `Gateway`.[securityGroupIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#securitygroupids_java/index.html)List<String>The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[serviceNetworkArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicenetworkarn_java/index.html)Changes to this property will trigger replacement.StringThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[serviceRegion](/content/registry/packages/awsx/api-docs/ec2/vpc/#serviceregion_java/index.html)Changes to this property will trigger replacement.StringThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[subnetConfigurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetconfigurations_java/index.html)[List<VpcEndpointSubnetConfiguration>](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[subnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetids_java/index.html)List<String>The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_java/index.html)Map<String,String>A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpcEndpointType](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointtype_java/index.html)Changes to this property will trigger replacement.StringThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

[serviceName](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicename_nodejs/index.html)This property is required.stringThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[autoAccept](/content/registry/packages/awsx/api-docs/ec2/vpc/#autoaccept_nodejs/index.html)booleanAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[dnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#dnsoptions_nodejs/index.html)[pulumiAws.types.input.VpcEndpointDnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[ipAddressType](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipaddresstype_nodejs/index.html)stringThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_nodejs/index.html)stringA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[privateDnsEnabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatednsenabled_nodejs/index.html)booleanWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_nodejs/index.html)stringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[resourceConfigurationArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resourceconfigurationarn_nodejs/index.html)Changes to this property will trigger replacement.stringThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[routeTableIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableids_nodejs/index.html)string\[\]One or more route table IDs. Applicable for endpoints of type `Gateway`.[securityGroupIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#securitygroupids_nodejs/index.html)string\[\]The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[serviceNetworkArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicenetworkarn_nodejs/index.html)Changes to this property will trigger replacement.stringThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[serviceRegion](/content/registry/packages/awsx/api-docs/ec2/vpc/#serviceregion_nodejs/index.html)Changes to this property will trigger replacement.stringThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[subnetConfigurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetconfigurations_nodejs/index.html)[pulumiAws.types.input.VpcEndpointSubnetConfiguration\[\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[subnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetids_nodejs/index.html)string\[\]The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_nodejs/index.html){\[key: string\]: string}A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpcEndpointType](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointtype_nodejs/index.html)Changes to this property will trigger replacement.stringThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

[service\_name](/content/registry/packages/awsx/api-docs/ec2/vpc/#service_name_python/index.html)This property is required.strThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[auto\_accept](/content/registry/packages/awsx/api-docs/ec2/vpc/#auto_accept_python/index.html)boolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[dns\_options](/content/registry/packages/awsx/api-docs/ec2/vpc/#dns_options_python/index.html)[pulumi\_aws.ec2.VpcEndpointDnsOptionsArgs](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[ip\_address\_type](/content/registry/packages/awsx/api-docs/ec2/vpc/#ip_address_type_python/index.html)strThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_python/index.html)strA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[private\_dns\_enabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#private_dns_enabled_python/index.html)boolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_python/index.html)strRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[resource\_configuration\_arn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resource_configuration_arn_python/index.html)Changes to this property will trigger replacement.strThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[route\_table\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#route_table_ids_python/index.html)Sequence\[str\]One or more route table IDs. Applicable for endpoints of type `Gateway`.[security\_group\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#security_group_ids_python/index.html)Sequence\[str\]The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[service\_network\_arn](/content/registry/packages/awsx/api-docs/ec2/vpc/#service_network_arn_python/index.html)Changes to this property will trigger replacement.strThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[service\_region](/content/registry/packages/awsx/api-docs/ec2/vpc/#service_region_python/index.html)Changes to this property will trigger replacement.strThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[subnet\_configurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_configurations_python/index.html)[Sequence\[pulumi\_aws.ec2.VpcEndpointSubnetConfigurationArgs\]](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[subnet\_ids](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnet_ids_python/index.html)Sequence\[str\]The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_python/index.html)Mapping\[str, str\]A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpc\_endpoint\_type](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpc_endpoint_type_python/index.html)Changes to this property will trigger replacement.strThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

[serviceName](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicename_yaml/index.html)This property is required.StringThe service name. For AWS services the service name is usually in the form `com.amazonaws.<region>.<service>` (the SageMaker Notebook service is an exception to this rule, the service name is in the form `aws.sagemaker.<region>.notebook`).[autoAccept](/content/registry/packages/awsx/api-docs/ec2/vpc/#autoaccept_yaml/index.html)BooleanAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).[dnsOptions](/content/registry/packages/awsx/api-docs/ec2/vpc/#dnsoptions_yaml/index.html)[Property Map](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointdnsoptions/index.html)

The DNS options for the endpoint. See dnsOptions below.

This type is defined in the [AWS Classic](/content/registry/packages/aws/index.html) package.

[ipAddressType](/content/registry/packages/awsx/api-docs/ec2/vpc/#ipaddresstype_yaml/index.html)StringThe IP address type for the endpoint. Valid values are `ipv4`, `dualstack`, and `ipv6`.[policy](/content/registry/packages/awsx/api-docs/ec2/vpc/#policy_yaml/index.html)StringA policy to attach to the endpoint that controls access to the service. This is a JSON formatted string. Defaults to full access. All `Gateway` and some `Interface` endpoints support policies - see the [relevant AWS documentation](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-access.html) for more details.[privateDnsEnabled](/content/registry/packages/awsx/api-docs/ec2/vpc/#privatednsenabled_yaml/index.html)BooleanWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to `false`.[region](/content/registry/packages/awsx/api-docs/ec2/vpc/#region_yaml/index.html)StringRegion where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.[resourceConfigurationArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#resourceconfigurationarn_yaml/index.html)Changes to this property will trigger replacement.StringThe ARN of a Resource Configuration to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[routeTableIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#routetableids_yaml/index.html)List<String>One or more route table IDs. Applicable for endpoints of type `Gateway`.[securityGroupIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#securitygroupids_yaml/index.html)List<String>The ID of one or more security groups to associate with the network interface. Applicable for endpoints of type `Interface`.
If no security groups are specified, the VPC's [default security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#DefaultSecurityGroup) is associated with the endpoint.[serviceNetworkArn](/content/registry/packages/awsx/api-docs/ec2/vpc/#servicenetworkarn_yaml/index.html)Changes to this property will trigger replacement.StringThe ARN of a Service Network to connect this VPC Endpoint to. Exactly one of `resourceConfigurationArn`, `serviceName` or `serviceNetworkArn` is required.[serviceRegion](/content/registry/packages/awsx/api-docs/ec2/vpc/#serviceregion_yaml/index.html)Changes to this property will trigger replacement.StringThe AWS region of the VPC Endpoint Service. If specified, the VPC endpoint will connect to the service in the provided region. Applicable for endpoints of type `Interface`.[subnetConfigurations](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetconfigurations_yaml/index.html)[List<Property Map>](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointsubnetconfiguration/index.html)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.[subnetIds](/content/registry/packages/awsx/api-docs/ec2/vpc/#subnetids_yaml/index.html)List<String>The ID of one or more subnets in which to create a network interface for the endpoint. Applicable for endpoints of type `GatewayLoadBalancer` and `Interface`. Interface type endpoints cannot function without being assigned to a subnet.[tags](/content/registry/packages/awsx/api-docs/ec2/vpc/#tags_yaml/index.html)Map<String>A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.[vpcEndpointType](/content/registry/packages/awsx/api-docs/ec2/vpc/#vpcendpointtype_yaml/index.html)Changes to this property will trigger replacement.StringThe VPC endpoint type, `Gateway`, `GatewayLoadBalancer`,`Interface`, `Resource` or `ServiceNetwork`. Defaults to `Gateway`.

## Package Details [Anchor](/content/registry/packages/awsx/api-docs/ec2/vpc/\#package-details/index.html)

Viewing docs for AWSx (Pulumi Crosswalk for AWS) v3.6.0

published on Friday, Jun 5, 2026 by Pulumi

[Schema (JSON)](/content/registry/packages/awsx/schema.json)

[pulumi/pulumi-awsx](https://github.com/pulumi/pulumi-awsx)

v3.6.0 (3.x, latest)v2.22.0 (2.x)v1.0.6 (1.x)

## On this page

## On this page

- Copy Page

[Scroll to top](/content/registry/packages/awsx/api-docs/ec2/vpc/# "Scroll to top"/index.html)

#### Try Pulumi Cloud free.  Your team will thank you.

[Start free trial](https://app.pulumi.com/signup?utm_source=registry&utm_medium=right-rail-banner&utm_campaign=try-pulumi-cloud&iaid=docs-try-pulumi-cloud-ad)
