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",
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.Vpc("example",
ip_range="10.10.10.0/24",
region="nyc3")import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = new digitalocean.Vpc("example", {
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,
});
}
}
Coming soon!
import pulumi
import pulumi_digitalocean as digitalocean
example_vpc = digitalocean.Vpc("exampleVpc", region="nyc3")
example_droplet = digitalocean.Droplet("exampleDroplet",
size="s-1vcpu-1gb",
image="ubuntu-18-04-x64",
region="nyc3",
vpc_uuid=example_vpc.id)import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const exampleVpc = new digitalocean.Vpc("exampleVpc", {region: "nyc3"});
const exampleDroplet = new digitalocean.Droplet("exampleDroplet", {
size: "s-1vcpu-1gb",
image: "ubuntu-18-04-x64",
region: "nyc3",
vpcUuid: exampleVpc.id,
});Create a Vpc Resource
new Vpc(name: string, args: VpcArgs, opts?: CustomResourceOptions);def Vpc(resource_name, opts=None, description=None, ip_range=None, name=None, region=None, __props__=None);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:
- Region string
The DigitalOcean region slug for the VPC’s location.
- Description string
A free-form text field up to a limit of 255 characters to describe the VPC.
- Ip
Range string 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
/16or smaller than/24.- Name string
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- Region string
The DigitalOcean region slug for the VPC’s location.
- Description string
A free-form text field up to a limit of 255 characters to describe the VPC.
- Ip
Range string 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
/16or smaller than/24.- Name string
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- region string
The DigitalOcean region slug for the VPC’s location.
- description string
A free-form text field up to a limit of 255 characters to describe the VPC.
- ip
Range string 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
/16or smaller than/24.- name string
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- region str
The DigitalOcean region slug for the VPC’s location.
- description str
A free-form text field up to a limit of 255 characters to describe the VPC.
- ip_
range str 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
/16or smaller than/24.- name str
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
Outputs
All input properties are implicitly available as output properties. Additionally, the Vpc resource produces the following output properties:
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): Vpcstatic get(resource_name, id, opts=None, created_at=None, default=None, description=None, ip_range=None, name=None, region=None, vpc_urn=None, __props__=None);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:
- Created
At string The date and time of when the VPC was created.
- Default bool
A boolean indicating whether or not the VPC is the default one for the region.
- Description string
A free-form text field up to a limit of 255 characters to describe the VPC.
- Ip
Range string 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
/16or smaller than/24.- Name string
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- Region string
The DigitalOcean region slug for the VPC’s location.
- Vpc
Urn string The uniform resource name (URN) for the VPC.
- Created
At string The date and time of when the VPC was created.
- Default bool
A boolean indicating whether or not the VPC is the default one for the region.
- Description string
A free-form text field up to a limit of 255 characters to describe the VPC.
- Ip
Range string 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
/16or smaller than/24.- Name string
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- Region string
The DigitalOcean region slug for the VPC’s location.
- Vpc
Urn string The uniform resource name (URN) for the VPC.
- created
At string The date and time of when the VPC was created.
- default boolean
A boolean indicating whether or not the VPC is the default one for the region.
- description string
A free-form text field up to a limit of 255 characters to describe the VPC.
- ip
Range string 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
/16or smaller than/24.- name string
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- region string
The DigitalOcean region slug for the VPC’s location.
- vpc
Urn string The uniform resource name (URN) for the VPC.
- created_
at str The date and time of when the VPC was created.
- default bool
A boolean indicating whether or not the VPC is the default one for the region.
- description str
A free-form text field up to a limit of 255 characters to describe the VPC.
- ip_
range str 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
/16or smaller than/24.- name str
A name for the VPC. Must be unique and contain alphanumeric characters, dashes, and periods only.
- region str
The DigitalOcean region slug for the VPC’s location.
- vpc_
urn str The uniform resource name (URN) for the VPC.
Package Details
- Repository
- https://github.com/pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.