Get a detailed overview of this resourceList the top 5 use cases for this resourceBuild a program using awsx.ec2.VpcRepositoryAWSx (Pulumi AWS Components) pulumi/pulumi-awsxLicenseApache-2.0
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
v3.6.0 (3.x, latest)v2.22.0 (2.x)v1.0.6 (1.x)
awsx.ec2.Vpc Anchor
Explore with Neo
Explain this resource Show real-world scenarios Provision a new instance
Viewing docs for AWSx (Pulumi Crosswalk for AWS) v3.6.0
published on Friday, Jun 5, 2026 by Pulumi
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)
The VPC component provides a VPC with configured subnets and NAT gateways.
Subnet Layout Strategies Anchor
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
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
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
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
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
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
- TypeScript
- Python
- Go
- C#
- Java
- YAML
- HCL PREVIEW
Basic usage
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
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!
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
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
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
resources:
vpc:
type: awsx:ec2:Vpc
outputs:
vpcId: ${vpc.vpcId}
vpcPrivateSubnetIds: ${vpc.privateSubnetIds}
vpcPublicSubnetIds: ${vpc.publicSubnetIds}
Copy
Create Vpc Resource Anchor
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax Anchor
- TypeScript
- Python
- Go
- C#
- Java
- YAML
- HCL PREVIEW
new Vpc(name: string, args?: VpcArgs, opts?: ComponentResourceOptions);
@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)
func NewVpc(ctx *Context, name string, args *VpcArgs, opts ...ResourceOption) (*Vpc, error)
public Vpc(string name, VpcArgs? args = null, ComponentResourceOptions? opts = null)
public Vpc(String name, VpcArgs args)
public Vpc(String name, VpcArgs args, ComponentResourceOptions options)
type: awsx:ec2:Vpc
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "awsx_ec2_vpc" "name" {
# resource properties
}
Parameters Anchor
nameThis property is required.stringThe unique name of the resource.argsVpcArgsThe arguments to resource properties.optsComponentResourceOptionsBag of options to control resource's behavior.
resource_nameThis property is required.strThe unique name of the resource.argsVpcArgsThe arguments to resource properties.optsResourceOptionsBag of options to control resource's behavior.
ctxContextContext object for the current deployment.nameThis property is required.stringThe unique name of the resource.argsVpcArgsThe arguments to resource properties.optsResourceOptionBag of options to control resource's behavior.
nameThis property is required.stringThe unique name of the resource.argsVpcArgsThe arguments to resource properties.optsComponentResourceOptionsBag of options to control resource's behavior.
nameThis property is required.StringThe unique name of the resource.argsThis property is required.VpcArgsThe arguments to resource properties.optionsComponentResourceOptionsBag of options to control resource's behavior.
Constructor example Anchor
The following reference example uses placeholder values for all input properties.
- TypeScript
- Python
- Go
- C#
- Java
- YAML
- HCL PREVIEW
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
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
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
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
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
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
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
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs Anchor
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Vpc resource accepts the following input properties:
AssignGeneratedIpv6CidrBlockboolRequests 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 ipv6IpamPoolIdAvailabilityZoneCidrMaskintThe 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.AvailabilityZoneNamesListdefault, 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.Ipv4IpamPoolIdChanges 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.Ipv4NetmaskLengthChanges to this property will trigger replacement.intThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4IpamPoolId.Ipv6CidrBlockstringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.Ipv6CidrBlockNetworkBorderGroupstringBy 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.Ipv6IpamPoolIdstringIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.Ipv6NetmaskLengthintNetmask 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.NatGatewaysNatGatewayConfigurationConfiguration 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.NumberOfAvailabilityZonesintA 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.RegionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.SubnetSpecsListLegacy.TagsDictionary<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.VpcEndpointSpecsList
AssignGeneratedIpv6CidrBlockboolRequests 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 ipv6IpamPoolIdAvailabilityZoneCidrMaskintThe 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[]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.CidrBlockstringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.EnableDnsHostnamesboolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.EnableDnsSupportboolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.EnableNetworkAddressUsageMetricsboolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.InstanceTenancystringA 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.Ipv4IpamPoolIdChanges 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.Ipv4NetmaskLengthChanges to this property will trigger replacement.intThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4IpamPoolId.Ipv6CidrBlockstringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.Ipv6CidrBlockNetworkBorderGroupstringBy 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.Ipv6IpamPoolIdstringIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.Ipv6NetmaskLengthintNetmask 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.NatGatewaysNatGatewayConfigurationArgsConfiguration 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.NumberOfAvailabilityZonesintA 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.RegionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.SubnetSpecs[]SubnetSpecArgsA 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.SubnetStrategySubnetAllocationStrategyThe strategy to use when allocating subnets for the VPC. Optional. Defaults to Legacy.Tagsmap[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[]VpcEndpointSpecArgsA list of VPC Endpoints specs to be deployed as part of the VPC
assign_generated_ipv6_cidr_blockboolRequests 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 ipv6IpamPoolIdavailability_zone_cidr_masknumberThe 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_nameslist(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_blockstringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.enable_dns_hostnamesboolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.enable_dns_supportboolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.enable_network_address_usage_metricsboolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.instance_tenancystringA 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_idChanges 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_lengthChanges 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_blockstringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.ipv6_cidr_block_network_border_groupstringBy 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_idstringIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.ipv6_netmask_lengthnumberNetmask 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_gatewaysobjectConfiguration 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_zonesnumberA 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.regionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.subnet_specslist(object)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"Legacy" | "Auto" | "AutoMerge" | "Exact"The strategy to use when allocating subnets for the VPC. Optional. Defaults to Legacy.tagsmap(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_specslist(object)A list of VPC Endpoints specs to be deployed as part of the VPC
assignGeneratedIpv6CidrBlockBooleanRequests 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 ipv6IpamPoolIdavailabilityZoneCidrMaskIntegerThe 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.availabilityZoneNamesListdefault, 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.ipv4IpamPoolIdChanges 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.ipv4NetmaskLengthChanges to this property will trigger replacement.IntegerThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4IpamPoolId.ipv6CidrBlockStringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.ipv6CidrBlockNetworkBorderGroupStringBy 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.ipv6IpamPoolIdStringIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.ipv6NetmaskLengthIntegerNetmask 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.natGatewaysNatGatewayConfigurationConfiguration 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.numberOfAvailabilityZonesIntegerA 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.regionStringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.subnetSpecsListLegacy.tagsMap<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.vpcEndpointSpecsList
assignGeneratedIpv6CidrBlockbooleanRequests 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 ipv6IpamPoolIdavailabilityZoneCidrMasknumberThe 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.availabilityZoneNamesstring[]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.cidrBlockstringThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.enableDnsHostnamesbooleanA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.enableDnsSupportbooleanA boolean flag to enable/disable DNS support in the VPC. Defaults to true.enableNetworkAddressUsageMetricsbooleanIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.instanceTenancystringA 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.ipv4IpamPoolIdChanges 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.ipv4NetmaskLengthChanges to this property will trigger replacement.numberThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4IpamPoolId.ipv6CidrBlockstringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.ipv6CidrBlockNetworkBorderGroupstringBy 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.ipv6IpamPoolIdstringIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.ipv6NetmaskLengthnumberNetmask 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.natGatewaysNatGatewayConfigurationConfiguration 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.numberOfAvailabilityZonesnumberA 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.regionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.subnetSpecsSubnetSpec[]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.subnetStrategySubnetAllocationStrategyThe strategy to use when allocating subnets for the VPC. Optional. Defaults to Legacy.tags{[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.vpcEndpointSpecsVpcEndpointSpec[]A list of VPC Endpoints specs to be deployed as part of the VPC
assign_generated_ipv6_cidr_blockboolRequests 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 ipv6IpamPoolIdavailability_zone_cidr_maskintThe 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_namesSequence[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_blockstrThe CIDR block for the VPC. Optional. Defaults to 10.0.0.0/16.enable_dns_hostnamesboolA boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.enable_dns_supportboolA boolean flag to enable/disable DNS support in the VPC. Defaults to true.enable_network_address_usage_metricsboolIndicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false.instance_tenancystrA 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_idChanges 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_lengthChanges 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_blockstrIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.ipv6_cidr_block_network_border_groupstrBy 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_idstrIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.ipv6_netmask_lengthintNetmask 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_gatewaysNatGatewayConfigurationArgsConfiguration 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_zonesintA 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.regionstrRegion where this resource will be managed. Defaults to the Region set in the provider configuration.subnet_specsSequence[SubnetSpecArgs]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_strategySubnetAllocationStrategyThe strategy to use when allocating subnets for the VPC. Optional. Defaults to Legacy.tagsMapping[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_specsSequence[VpcEndpointSpecArgs]A list of VPC Endpoints specs to be deployed as part of the VPC
assignGeneratedIpv6CidrBlockBooleanRequests 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 ipv6IpamPoolIdavailabilityZoneCidrMaskNumberThe 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.availabilityZoneNamesListdefault, 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.ipv4IpamPoolIdChanges 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.ipv4NetmaskLengthChanges to this property will trigger replacement.NumberThe netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a ipv4IpamPoolId.ipv6CidrBlockStringIPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using ipv6NetmaskLength.ipv6CidrBlockNetworkBorderGroupStringBy 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.ipv6IpamPoolIdStringIPAM Pool ID for a IPv6 pool. Conflicts with assignGeneratedIpv6CidrBlock.ipv6NetmaskLengthNumberNetmask 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.natGatewaysProperty MapConfiguration 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.numberOfAvailabilityZonesNumberA 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.regionStringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.subnetSpecsListLegacy.tagsMapdefaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.vpcEndpointSpecsList
Outputs Anchor
All input properties are implicitly available as output properties. Additionally, the Vpc resource produces the following output properties:
AwsVpcPulumi.Aws.Ec2.VpcThe VPC.
This type is defined in the AWS Classic package.EipsList<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.InternetGatewayPulumi.Aws.Ec2.InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the AWS Classic package.IsolatedSubnetIdsList
EipsEipThe EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.InternetGatewayInternetGatewayThe Internet Gateway for the VPC. This type is defined in the AWS Classic package.IsolatedSubnetIds[]stringIsolatedSubnetsSubnetThe VPC's isolated subnets.PrivateSubnetIds[]stringPrivateSubnetsSubnetThe VPC's private subnets.PublicSubnetIds[]stringPublicSubnetsSubnetThe VPC's public subnets.RouteTableAssociationsRouteTableAssociationThe Route Table Associations for the VPC.RouteTablesRouteTableThe Route Tables for the VPC.RoutesRouteThe Routes for the VPC.SubnetLayout[]ResolvedSubnetSpecThe resolved subnet specs layout deployed to each availability zone.SubnetsSubnetThe VPC's subnets.VpcVpcThe VPC. This type is defined in the AWS Classic package.VpcEndpointsVpcEndpointThe VPC Endpoints that are enabledVpcIdstring
eipslist(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_gatewayaws_ec2_internetgateway_internetgatewayThe Internet Gateway for the VPC. This type is defined in the AWS Classic package.isolated_subnet_idslist(string)isolated_subnetslist(aws_ec2_subnet_subnet)The VPC's isolated subnets.private_subnet_idslist(string)private_subnetslist(aws_ec2_subnet_subnet)The VPC's private subnets.public_subnet_idslist(string)public_subnetslist(aws_ec2_subnet_subnet)The VPC's public subnets.route_table_associationslist(aws_ec2_routetableassociation_routetableassociation)The Route Table Associations for the VPC.route_tableslist(aws_ec2_routetable_routetable)The Route Tables for the VPC.routeslist(aws_ec2_route_route)The Routes for the VPC.subnet_layoutlist(object)The resolved subnet specs layout deployed to each availability zone.subnetslist(aws_ec2_subnet_subnet)The VPC's subnets.vpcaws_ec2_vpc_vpcThe VPC. This type is defined in the AWS Classic package.vpc_endpointslist(aws_ec2_vpcendpoint_vpcendpoint)The VPC Endpoints that are enabledvpc_idstring
eipsList
eipspulumiAws.Eip[]The EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.internetGatewaypulumiAws.InternetGatewayThe Internet Gateway for the VPC. This type is defined in the AWS Classic package.isolatedSubnetIdsstring[]isolatedSubnetspulumiAws.Subnet[]The VPC's isolated subnets.privateSubnetIdsstring[]privateSubnetspulumiAws.Subnet[]The VPC's private subnets.publicSubnetIdsstring[]publicSubnetspulumiAws.Subnet[]The VPC's public subnets.routeTableAssociationspulumiAws.RouteTableAssociation[]The Route Table Associations for the VPC.routeTablespulumiAws.RouteTable[]The Route Tables for the VPC.routespulumiAws.Route[]The Routes for the VPC.subnetLayoutResolvedSubnetSpec[]The resolved subnet specs layout deployed to each availability zone.subnetspulumiAws.Subnet[]The VPC's subnets.vpcpulumiAws.VpcThe VPC. This type is defined in the AWS Classic package.vpcEndpointspulumiAws.VpcEndpoint[]The VPC Endpoints that are enabledvpcIdstring
eipsSequence[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_gatewaypulumi_aws.ec2.InternetGatewayThe Internet Gateway for the VPC. This type is defined in the AWS Classic package.isolated_subnet_idsSequence[str]isolated_subnetsSequence[pulumi_aws.ec2.Subnet]The VPC's isolated subnets.private_subnet_idsSequence[str]private_subnetsSequence[pulumi_aws.ec2.Subnet]The VPC's private subnets.public_subnet_idsSequence[str]public_subnetsSequence[pulumi_aws.ec2.Subnet]The VPC's public subnets.route_table_associationsSequence[pulumi_aws.ec2.RouteTableAssociation]The Route Table Associations for the VPC.route_tablesSequence[pulumi_aws.ec2.RouteTable]The Route Tables for the VPC.routesSequence[pulumi_aws.ec2.Route]The Routes for the VPC.subnet_layoutSequence[ResolvedSubnetSpec]The resolved subnet specs layout deployed to each availability zone.subnetsSequence[pulumi_aws.ec2.Subnet]The VPC's subnets.vpcpulumi_aws.ec2.VpcThe VPC. This type is defined in the AWS Classic package.vpc_endpointsSequence[pulumi_aws.ec2.VpcEndpoint]The VPC Endpoints that are enabledvpc_idstr
eipsListaws::EipThe EIPs for any NAT Gateways for the VPC. If no NAT Gateways are specified, this will be an empty list.internetGatewayaws::InternetGatewayThe Internet Gateway for the VPC.
This type is defined in the AWS Classic package.isolatedSubnetIdsList
Supporting Types Anchor
NatGatewayConfiguration , NatGatewayConfigurationArgs Anchor
Configuration for NAT Gateways.
StrategyThis property is required.Pulumi.Awsx.Ec2.NatGatewayStrategyThe strategy for deploying NAT Gateways.ElasticIpAllocationIdsList
StrategyThis property is required.NatGatewayStrategyThe strategy for deploying NAT Gateways.ElasticIpAllocationIds[]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).
strategyThis property is required."None" | "Single" | "OnePerAz"The strategy for deploying NAT Gateways.elastic_ip_allocation_idslist(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).
strategyThis property is required.NatGatewayStrategyThe strategy for deploying NAT Gateways.elasticIpAllocationIdsList
strategyThis property is required.NatGatewayStrategyThe strategy for deploying NAT Gateways.elasticIpAllocationIdsstring[]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).
strategyThis property is required.NatGatewayStrategyThe strategy for deploying NAT Gateways.elastic_ip_allocation_idsSequence[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).
strategyThis property is required."None" | "Single" | "OnePerAz"The strategy for deploying NAT Gateways.elasticIpAllocationIdsList
NatGatewayStrategy , NatGatewayStrategyArgs Anchor
NoneNone Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.SingleSingle 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.OnePerAzOnePerAz Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure.
NatGatewayStrategyNoneNone Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.NatGatewayStrategySingleSingle 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.NatGatewayStrategyOnePerAzOnePerAz 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.
NONENone Do not create any NAT Gateways. Resources in private subnets will not be able to access the internet.SINGLESingle 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_AZOnePerAz Create a NAT Gateway in each availability zone. This is the recommended configuration for production infrastructure.
ResolvedSubnetSpec , ResolvedSubnetSpecArgs Anchor
Configuration for a VPC subnet spec.
TypeThis property is required.Pulumi.Awsx.Ec2.SubnetTypeThe type of subnet.CidrBlocksListcidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.NamestringThe subnet's name. Will be templated upon creation.SizeintOptional 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.
TypeThis property is required.SubnetTypeThe type of subnet.CidrBlocks[]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.CidrMaskintThe 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.NamestringThe subnet's name. Will be templated upon creation.SizeintOptional 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.
typeThis property is required."Public" | "Private" | "Isolated" | "Unused"The type of subnet.cidr_blockslist(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_masknumberThe 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.namestringThe subnet's name. Will be templated upon creation.sizenumberOptional 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.
typeThis property is required.SubnetTypeThe type of subnet.cidrBlocksListcidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.nameStringThe subnet's name. Will be templated upon creation.sizeIntegerOptional 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.
typeThis property is required.SubnetTypeThe type of subnet.cidrBlocksstring[]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.cidrMasknumberThe 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.namestringThe subnet's name. Will be templated upon creation.sizenumberOptional 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.
typeThis property is required.SubnetTypeThe type of subnet.cidr_blocksSequence[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_maskintThe 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.namestrThe subnet's name. Will be templated upon creation.sizeintOptional 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.
typeThis property is required."Public" | "Private" | "Isolated" | "Unused"The type of subnet.cidrBlocksListcidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.nameStringThe subnet's name. Will be templated upon creation.sizeNumberOptional 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
LegacyLegacy Group private subnets first, followed by public subnets, followed by isolated subnets.AutoAuto Order remains as specified by specs, allowing gaps where required.AutoMergeAutoMerge Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types.ExactExact Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.
SubnetAllocationStrategyLegacyLegacy Group private subnets first, followed by public subnets, followed by isolated subnets.SubnetAllocationStrategyAutoAuto Order remains as specified by specs, allowing gaps where required.SubnetAllocationStrategyAutoMergeAutoMerge Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types.SubnetAllocationStrategyExactExact 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.
LEGACYLegacy Group private subnets first, followed by public subnets, followed by isolated subnets.AUTOAuto Order remains as specified by specs, allowing gaps where required.AUTO_MERGEAutoMerge Start from the default auto-generated public/private layout and merge user-provided subnet settings into matching subnet types.EXACTExact Whole range of VPC must be accounted for, using "Unused" spec types for deliberate gaps.
SubnetSpec , SubnetSpecArgs Anchor
Configuration for a VPC subnet.
TypeThis property is required.Pulumi.Awsx.Ec2.SubnetTypeThe type of subnet.AssignIpv6AddressOnCreationboolIndicates whether a network interface created in this subnet receives an IPv6 address.CidrBlocksListcidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.NamestringThe subnet's name. Will be templated upon creation.SizeintOptional 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.TagsDictionary<string, string>A map of tags to assign to the resource.
TypeThis property is required.SubnetTypeThe type of subnet.AssignIpv6AddressOnCreationboolIndicates whether a network interface created in this subnet receives an IPv6 address.CidrBlocks[]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.CidrMaskintThe 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.NamestringThe subnet's name. Will be templated upon creation.SizeintOptional 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.Tagsmap[string]stringA map of tags to assign to the resource.
typeThis property is required."Public" | "Private" | "Isolated" | "Unused"The type of subnet.assign_ipv6_address_on_creationboolIndicates whether a network interface created in this subnet receives an IPv6 address.cidr_blockslist(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_masknumberThe 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.namestringThe subnet's name. Will be templated upon creation.sizenumberOptional 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.tagsmap(string)A map of tags to assign to the resource.
typeThis property is required.SubnetTypeThe type of subnet.assignIpv6AddressOnCreationBooleanIndicates whether a network interface created in this subnet receives an IPv6 address.cidrBlocksListcidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.nameStringThe subnet's name. Will be templated upon creation.sizeIntegerOptional 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.tagsMap<String,String>A map of tags to assign to the resource.
typeThis property is required.SubnetTypeThe type of subnet.assignIpv6AddressOnCreationbooleanIndicates whether a network interface created in this subnet receives an IPv6 address.cidrBlocksstring[]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.cidrMasknumberThe 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.namestringThe subnet's name. Will be templated upon creation.sizenumberOptional 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{[key: string]: string}A map of tags to assign to the resource.
typeThis property is required.SubnetTypeThe type of subnet.assign_ipv6_address_on_creationboolIndicates whether a network interface created in this subnet receives an IPv6 address.cidr_blocksSequence[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_maskintThe 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.namestrThe subnet's name. Will be templated upon creation.sizeintOptional 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.tagsMapping[str, str]A map of tags to assign to the resource.
typeThis property is required."Public" | "Private" | "Isolated" | "Unused"The type of subnet.assignIpv6AddressOnCreationBooleanIndicates whether a network interface created in this subnet receives an IPv6 address.cidrBlocksListcidrMask, cidrBlocks or based on an even distribution of available space from the VPC's CIDR block after being divided evenly by availability zone.nameStringThe subnet's name. Will be templated upon creation.sizeNumberOptional 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.tagsMap
SubnetType , SubnetTypeArgs Anchor
PublicPublic A subnet whose hosts can directly communicate with the internet.PrivatePrivate A subnet whose hosts can not directly communicate with the internet, but can initiate outbound network traffic via a NAT Gateway.IsolatedIsolated A subnet whose hosts have no connectivity with the internet.UnusedUnused A subnet range which is reserved, but no subnet will be created.
SubnetTypePublicPublic A subnet whose hosts can directly communicate with the internet.SubnetTypePrivatePrivate A subnet whose hosts can not directly communicate with the internet, but can initiate outbound network traffic via a NAT Gateway.SubnetTypeIsolatedIsolated A subnet whose hosts have no connectivity with the internet.SubnetTypeUnusedUnused 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
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 singlesecurityGroupId), and Subnets - (an association between a VPC endpoint and a singlesubnetId) and a VPC Endpoint resource withrouteTableIdsandsubnetIdsattributes. 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
Basic Anchor
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",
});
import pulumi
import pulumi_aws as aws
s3 = aws.ec2.VpcEndpoint("s3",
vpc_id=main["id"],
service_name="com.amazonaws.us-west-2.s3")
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",
});
});
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
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ec2_vpcendpoint" "s3" {
vpc_id = main.id
service_name = "com.amazonaws.us-west-2.s3"
}
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());
}
}
resources:
s3:
type: aws:ec2:VpcEndpoint
properties:
vpcId: ${main.id}
serviceName: com.amazonaws.us-west-2.s3
Basic w/ Tags Anchor
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",
},
});
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",
})
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" },
},
});
});
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
})
}
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"
}
}
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());
}
}
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
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",
},
});
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",
})
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" },
},
});
});
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
})
}
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"
}
}
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());
}
}
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
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,
});
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)
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,
});
});
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
})
}
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
}
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());
}
}
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
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,\
],
});
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"],\
])
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,
},
});
});
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
})
}
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]
}
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());
}
}
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
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,
});
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"])
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,
});
});
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
})
}
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
}
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());
}
}
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
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,
});
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"])
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,
});
});
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
})
}
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
}
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());
}
}
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
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,
});
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"])
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,
});
});
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
})
}
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
}
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());
}
}
resources:
example:
type: aws:ec2:VpcEndpoint
properties:
serviceNetworkArn: ${exampleAwsVpclatticeServiceNetwork.arn}
subnetIds:
- ${exampleAwsSubnet.id}
vpcEndpointType: ServiceNetwork
vpcId: ${exampleAwsVpc.id}
Non-AWS Service Anchor
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],
});
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))])
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),
},
});
});
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
})
}
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"]]
}
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());
}
}
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
dnsEntryoutput is a list of maps: This provider interpolation support for lists of maps requires thelookupand[]until full support of lists of maps is available
Import Anchor
Identity Schema Anchor
Required Anchor
id- (String) ID of the VPC endpoint.
Optional Anchor
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:
$ pulumi import aws:ec2/vpcEndpoint:VpcEndpoint example vpce-3ecf2a57
ServiceNameThis 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).AutoAcceptboolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).DnsOptionsPulumi.Aws.Ec2.Inputs.VpcEndpointDnsOptions
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
IpAddressTypestringThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.PolicystringA 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 for more details.PrivateDnsEnabledboolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.RegionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.ResourceConfigurationArnChanges 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.RouteTableIdsListGateway.SecurityGroupIdsListInterface.
If no security groups are specified, the VPC's default security group is associated with the endpoint.ServiceNetworkArnChanges 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.ServiceRegionChanges 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.SubnetConfigurationsList<Pulumi.Aws.Ec2.Inputs.VpcEndpointSubnetConfiguration>Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.SubnetIdsListGatewayLoadBalancer and Interface. Interface type endpoints cannot function without being assigned to a subnet.TagsDictionary<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.VpcEndpointTypeChanges to this property will trigger replacement.stringThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
ServiceNameThis 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).AutoAcceptboolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).DnsOptionsVpcEndpointDnsOptions
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
IpAddressTypestringThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.PolicystringA 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 for more details.PrivateDnsEnabledboolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.RegionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.ResourceConfigurationArnChanges 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[]stringOne or more route table IDs. Applicable for endpoints of type Gateway.SecurityGroupIds[]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 is associated with the endpoint.ServiceNetworkArnChanges 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.ServiceRegionChanges 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.SubnetConfigurationsVpcEndpointSubnetConfigurationSubnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.SubnetIds[]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.Tagsmap[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.VpcEndpointTypeChanges to this property will trigger replacement.stringThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
service_nameThis 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_acceptboolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).dns_optionsobject
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
ip_address_typestringThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.policystringA 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 for more details.private_dns_enabledboolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.regionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.resource_configuration_arnChanges 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_idslist(string)One or more route table IDs. Applicable for endpoints of type Gateway.security_group_idslist(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 is associated with the endpoint.service_network_arnChanges 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_regionChanges 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_configurationslist(object)Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.subnet_idslist(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.tagsmap(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_typeChanges to this property will trigger replacement.stringThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
serviceNameThis 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).autoAcceptBooleanAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).dnsOptionsVpcEndpointDnsOptions
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
ipAddressTypeStringThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.policyStringA 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 for more details.privateDnsEnabledBooleanWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.regionStringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.resourceConfigurationArnChanges 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.routeTableIdsListGateway.securityGroupIdsListInterface.
If no security groups are specified, the VPC's default security group is associated with the endpoint.serviceNetworkArnChanges 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.serviceRegionChanges 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.subnetConfigurationsListGatewayLoadBalancer and Interface. Interface type endpoints cannot function without being assigned to a subnet.tagsMap<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.vpcEndpointTypeChanges to this property will trigger replacement.StringThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
serviceNameThis 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).autoAcceptbooleanAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).dnsOptionspulumiAws.types.input.VpcEndpointDnsOptions
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
ipAddressTypestringThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.policystringA 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 for more details.privateDnsEnabledbooleanWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.regionstringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.resourceConfigurationArnChanges 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.routeTableIdsstring[]One or more route table IDs. Applicable for endpoints of type Gateway.securityGroupIdsstring[]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 is associated with the endpoint.serviceNetworkArnChanges 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.serviceRegionChanges 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.subnetConfigurationspulumiAws.types.input.VpcEndpointSubnetConfiguration[]Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.subnetIdsstring[]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{[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.vpcEndpointTypeChanges to this property will trigger replacement.stringThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
service_nameThis 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_acceptboolAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).dns_optionspulumi_aws.ec2.VpcEndpointDnsOptionsArgs
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
ip_address_typestrThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.policystrA 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 for more details.private_dns_enabledboolWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.regionstrRegion where this resource will be managed. Defaults to the Region set in the provider configuration.resource_configuration_arnChanges 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_idsSequence[str]One or more route table IDs. Applicable for endpoints of type Gateway.security_group_idsSequence[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 is associated with the endpoint.service_network_arnChanges 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_regionChanges 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_configurationsSequence[pulumi_aws.ec2.VpcEndpointSubnetConfigurationArgs]Subnet configuration for the endpoint, used to select specific IPv4 and/or IPv6 addresses to the endpoint. See subnetConfiguration below.subnet_idsSequence[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.tagsMapping[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_typeChanges to this property will trigger replacement.strThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
serviceNameThis 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).autoAcceptBooleanAccept the VPC endpoint (the VPC endpoint and service need to be in the same AWS account).dnsOptionsProperty Map
The DNS options for the endpoint. See dnsOptions below.
This type is defined in the AWS Classic package.
ipAddressTypeStringThe IP address type for the endpoint. Valid values are ipv4, dualstack, and ipv6.policyStringA 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 for more details.privateDnsEnabledBooleanWhether or not to associate a private hosted zone with the specified VPC. Applicable for endpoints of type Interface. Defaults to false.regionStringRegion where this resource will be managed. Defaults to the Region set in the provider configuration.resourceConfigurationArnChanges 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.routeTableIdsListGateway.securityGroupIdsListInterface.
If no security groups are specified, the VPC's default security group is associated with the endpoint.serviceNetworkArnChanges 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.serviceRegionChanges 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.subnetConfigurationsListGatewayLoadBalancer and Interface. Interface type endpoints cannot function without being assigned to a subnet.tagsMapdefaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.vpcEndpointTypeChanges to this property will trigger replacement.StringThe VPC endpoint type, Gateway, GatewayLoadBalancer,Interface, Resource or ServiceNetwork. Defaults to Gateway.
Package Details Anchor
Viewing docs for AWSx (Pulumi Crosswalk for AWS) v3.6.0
published on Friday, Jun 5, 2026 by Pulumi
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)