Class Vpc
Provides a VPC resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.0.0.0/16",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2
Assembly: Pulumi.Aws.dll
Syntax
public class Vpc : CustomResource
Constructors
View SourceVpc(String, VpcArgs, CustomResourceOptions)
Create a Vpc resource with the given unique name, arguments, and options.
Declaration
public Vpc(string name, VpcArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| VpcArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
Amazon Resource Name (ARN) of VPC
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
AssignGeneratedIpv6CidrBlock
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.
Declaration
public Output<bool?> AssignGeneratedIpv6CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
CidrBlock
The CIDR block for the VPC.
Declaration
public Output<string> CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultNetworkAclId
The ID of the network ACL created by default on VPC creation
Declaration
public Output<string> DefaultNetworkAclId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultRouteTableId
The ID of the route table created by default on VPC creation
Declaration
public Output<string> DefaultRouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultSecurityGroupId
The ID of the security group created by default on VPC creation
Declaration
public Output<string> DefaultSecurityGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DhcpOptionsId
Declaration
public Output<string> DhcpOptionsId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableClassiclink
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.
Declaration
public Output<bool> EnableClassiclink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EnableClassiclinkDnsSupport
A boolean flag to enable/disable ClassicLink DNS Support for the VPC. Only valid in regions and accounts that support EC2 Classic.
Declaration
public Output<bool> EnableClassiclinkDnsSupport { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EnableDnsHostnames
A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false.
Declaration
public Output<bool> EnableDnsHostnames { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
EnableDnsSupport
A boolean flag to enable/disable DNS support in the VPC. Defaults true.
Declaration
public Output<bool?> EnableDnsSupport { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
InstanceTenancy
A tenancy option for instances launched into the VPC
Declaration
public Output<string> InstanceTenancy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv6AssociationId
The association ID for the IPv6 CIDR block.
Declaration
public Output<string> Ipv6AssociationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ipv6CidrBlock
The IPv6 CIDR block.
Declaration
public Output<string> Ipv6CidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MainRouteTableId
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.
Declaration
public Output<string> MainRouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
OwnerId
The ID of the AWS account that owns the VPC.
Declaration
public Output<string> OwnerId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, VpcState, CustomResourceOptions)
Get an existing Vpc resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Vpc Get(string name, Input<string> id, VpcState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| VpcState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Vpc |