Vpc

Provides a VPC resource.

Example Usage

Coming soon!

Coming soon!

import pulumi
import pulumi_aws as aws

main = aws.ec2.Vpc("main", cidr_block="10.0.0.0/16")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const main = new aws.ec2.Vpc("main", {
    cidrBlock: "10.0.0.0/16",
});

Create a Vpc Resource

new Vpc(name: string, args: VpcArgs, opts?: CustomResourceOptions);
def Vpc(resource_name, opts=None, assign_generated_ipv6_cidr_block=None, cidr_block=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, instance_tenancy=None, tags=None, __props__=None);
func NewVpc(ctx *Context, name string, args VpcArgs, opts ...ResourceOption) (*Vpc, error)
public Vpc(string name, VpcArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VpcArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VpcArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Vpc Resource Properties

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

Inputs

The Vpc resource accepts the following input properties:

CidrBlock string

The CIDR block for the VPC.

AssignGeneratedIpv6CidrBlock bool

Requests 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.

EnableClassiclink bool

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

EnableClassiclinkDnsSupport bool

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

EnableDnsHostnames bool

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

EnableDnsSupport bool

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

InstanceTenancy string

A tenancy option for instances launched into the VPC

Tags Dictionary<string, object>

A map of tags to assign to the resource.

CidrBlock string

The CIDR block for the VPC.

AssignGeneratedIpv6CidrBlock bool

Requests 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.

EnableClassiclink bool

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

EnableClassiclinkDnsSupport bool

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

EnableDnsHostnames bool

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

EnableDnsSupport bool

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

InstanceTenancy string

A tenancy option for instances launched into the VPC

Tags map[string]interface{}

A map of tags to assign to the resource.

cidrBlock string

The CIDR block for the VPC.

assignGeneratedIpv6CidrBlock boolean

Requests 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.

enableClassiclink boolean

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

enableClassiclinkDnsSupport boolean

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

enableDnsHostnames boolean

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

enableDnsSupport boolean

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

instanceTenancy string

A tenancy option for instances launched into the VPC

tags {[key: string]: any}

A map of tags to assign to the resource.

cidr_block str

The CIDR block for the VPC.

assign_generated_ipv6_cidr_block bool

Requests 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.

enable_classiclink bool

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

enable_classiclink_dns_support bool

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

enable_dns_hostnames bool

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

enable_dns_support bool

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

instance_tenancy str

A tenancy option for instances launched into the VPC

tags Dict[str, Any]

A map of tags to assign to the resource.

Outputs

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

Arn string

Amazon Resource Name (ARN) of VPC

DefaultNetworkAclId string

The ID of the network ACL created by default on VPC creation

DefaultRouteTableId string

The ID of the route table created by default on VPC creation

DefaultSecurityGroupId string

The ID of the security group created by default on VPC creation

DhcpOptionsId string
Id string
The provider-assigned unique ID for this managed resource.
Ipv6AssociationId string

The association ID for the IPv6 CIDR block.

Ipv6CidrBlock string

The IPv6 CIDR block.

MainRouteTableId string

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

OwnerId string

The ID of the AWS account that owns the VPC.

Arn string

Amazon Resource Name (ARN) of VPC

DefaultNetworkAclId string

The ID of the network ACL created by default on VPC creation

DefaultRouteTableId string

The ID of the route table created by default on VPC creation

DefaultSecurityGroupId string

The ID of the security group created by default on VPC creation

DhcpOptionsId string
Id string
The provider-assigned unique ID for this managed resource.
Ipv6AssociationId string

The association ID for the IPv6 CIDR block.

Ipv6CidrBlock string

The IPv6 CIDR block.

MainRouteTableId string

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

OwnerId string

The ID of the AWS account that owns the VPC.

arn string

Amazon Resource Name (ARN) of VPC

defaultNetworkAclId string

The ID of the network ACL created by default on VPC creation

defaultRouteTableId string

The ID of the route table created by default on VPC creation

defaultSecurityGroupId string

The ID of the security group created by default on VPC creation

dhcpOptionsId string
id string
The provider-assigned unique ID for this managed resource.
ipv6AssociationId string

The association ID for the IPv6 CIDR block.

ipv6CidrBlock string

The IPv6 CIDR block.

mainRouteTableId string

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

ownerId string

The ID of the AWS account that owns the VPC.

arn str

Amazon Resource Name (ARN) of VPC

default_network_acl_id str

The ID of the network ACL created by default on VPC creation

default_route_table_id str

The ID of the route table created by default on VPC creation

default_security_group_id str

The ID of the security group created by default on VPC creation

dhcp_options_id str
id str
The provider-assigned unique ID for this managed resource.
ipv6_association_id str

The association ID for the IPv6 CIDR block.

ipv6_cidr_block str

The IPv6 CIDR block.

main_route_table_id str

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

owner_id str

The ID of the AWS account that owns the VPC.

Look up an Existing Vpc Resource

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

public static get(name: string, id: Input<ID>, state?: VpcState, opts?: CustomResourceOptions): Vpc
static get(resource_name, id, opts=None, arn=None, assign_generated_ipv6_cidr_block=None, cidr_block=None, default_network_acl_id=None, default_route_table_id=None, default_security_group_id=None, dhcp_options_id=None, enable_classiclink=None, enable_classiclink_dns_support=None, enable_dns_hostnames=None, enable_dns_support=None, instance_tenancy=None, ipv6_association_id=None, ipv6_cidr_block=None, main_route_table_id=None, owner_id=None, tags=None, __props__=None);
func GetVpc(ctx *Context, name string, id IDInput, state *VpcState, opts ...ResourceOption) (*Vpc, error)
public static Vpc Get(string name, Input<string> id, VpcState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

Amazon Resource Name (ARN) of VPC

AssignGeneratedIpv6CidrBlock bool

Requests 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.

CidrBlock string

The CIDR block for the VPC.

DefaultNetworkAclId string

The ID of the network ACL created by default on VPC creation

DefaultRouteTableId string

The ID of the route table created by default on VPC creation

DefaultSecurityGroupId string

The ID of the security group created by default on VPC creation

DhcpOptionsId string
EnableClassiclink bool

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

EnableClassiclinkDnsSupport bool

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

EnableDnsHostnames bool

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

EnableDnsSupport bool

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

InstanceTenancy string

A tenancy option for instances launched into the VPC

Ipv6AssociationId string

The association ID for the IPv6 CIDR block.

Ipv6CidrBlock string

The IPv6 CIDR block.

MainRouteTableId string

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

OwnerId string

The ID of the AWS account that owns the VPC.

Tags Dictionary<string, object>

A map of tags to assign to the resource.

Arn string

Amazon Resource Name (ARN) of VPC

AssignGeneratedIpv6CidrBlock bool

Requests 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.

CidrBlock string

The CIDR block for the VPC.

DefaultNetworkAclId string

The ID of the network ACL created by default on VPC creation

DefaultRouteTableId string

The ID of the route table created by default on VPC creation

DefaultSecurityGroupId string

The ID of the security group created by default on VPC creation

DhcpOptionsId string
EnableClassiclink bool

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

EnableClassiclinkDnsSupport bool

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

EnableDnsHostnames bool

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

EnableDnsSupport bool

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

InstanceTenancy string

A tenancy option for instances launched into the VPC

Ipv6AssociationId string

The association ID for the IPv6 CIDR block.

Ipv6CidrBlock string

The IPv6 CIDR block.

MainRouteTableId string

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

OwnerId string

The ID of the AWS account that owns the VPC.

Tags map[string]interface{}

A map of tags to assign to the resource.

arn string

Amazon Resource Name (ARN) of VPC

assignGeneratedIpv6CidrBlock boolean

Requests 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.

cidrBlock string

The CIDR block for the VPC.

defaultNetworkAclId string

The ID of the network ACL created by default on VPC creation

defaultRouteTableId string

The ID of the route table created by default on VPC creation

defaultSecurityGroupId string

The ID of the security group created by default on VPC creation

dhcpOptionsId string
enableClassiclink boolean

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

enableClassiclinkDnsSupport boolean

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

enableDnsHostnames boolean

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

enableDnsSupport boolean

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

instanceTenancy string

A tenancy option for instances launched into the VPC

ipv6AssociationId string

The association ID for the IPv6 CIDR block.

ipv6CidrBlock string

The IPv6 CIDR block.

mainRouteTableId string

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

ownerId string

The ID of the AWS account that owns the VPC.

tags {[key: string]: any}

A map of tags to assign to the resource.

arn str

Amazon Resource Name (ARN) of VPC

assign_generated_ipv6_cidr_block bool

Requests 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.

cidr_block str

The CIDR block for the VPC.

default_network_acl_id str

The ID of the network ACL created by default on VPC creation

default_route_table_id str

The ID of the route table created by default on VPC creation

default_security_group_id str

The ID of the security group created by default on VPC creation

dhcp_options_id str
enable_classiclink bool

A boolean flag to enable/disable ClassicLink for the VPC. Only valid in regions and accounts that support EC2 Classic. See the ClassicLink documentation for more information. Defaults false.

enable_classiclink_dns_support bool

A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.

enable_dns_hostnames bool

A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.

enable_dns_support bool

A boolean flag to enable/disable DNS support in the VPC. Defaults true.

instance_tenancy str

A tenancy option for instances launched into the VPC

ipv6_association_id str

The association ID for the IPv6 CIDR block.

ipv6_cidr_block str

The IPv6 CIDR block.

main_route_table_id str

The ID of the main route table associated with this VPC. Note that you can change a VPC’s main route table by using an aws.ec2.MainRouteTableAssociation.

owner_id str

The ID of the AWS account that owns the VPC.

tags Dict[str, Any]

A map of tags to assign to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.