Show / Hide Table of Contents

Class Vpc

Provides a DigitalOcean VPC resource.

VPCs are virtual networks containing resources that can communicate with each other in full isolation, using private IP addresses.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var example = new DigitalOcean.Vpc("example", new DigitalOcean.VpcArgs
    {
        IpRange = "10.10.10.0/24",
        Region = "nyc3",
    });
}

}

Resource Assignment

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var exampleVpc = new DigitalOcean.Vpc("exampleVpc", new DigitalOcean.VpcArgs
    {
        Region = "nyc3",
    });
    var exampleDroplet = new DigitalOcean.Droplet("exampleDroplet", new DigitalOcean.DropletArgs
    {
        Size = "s-1vcpu-1gb",
        Image = "ubuntu-18-04-x64",
        Region = "nyc3",
        VpcUuid = exampleVpc.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Vpc
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class Vpc : CustomResource

Constructors

View Source

Vpc(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 Source

CreatedAt

The date and time of when the VPC was created.

Declaration
public Output<string> CreatedAt { get; }
Property Value
Type Description
Output<System.String>
View Source

Default

A boolean indicating whether or not the VPC is the default one for the region.

Declaration
public Output<bool> Default { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Description

A free-form text field up to a limit of 255 characters to describe the VPC.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

IpRange

The range of IP addresses for the VPC in CIDR notation. Network ranges cannot overlap with other networks in the same account and must be in range of private addresses as defined in RFC1918. It may not be larger than /16 or smaller than /24.

Declaration
public Output<string> IpRange { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Region

The DigitalOcean region slug for the VPC's location.

Declaration
public Output<string> Region { get; }
Property Value
Type Description
Output<System.String>
View Source

Urn

The uniform resource name (URN) for the VPC.

Declaration
public Output<string> Urn { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.