Want to learn about running containers in Lambda? Join our free hands-on workshop. Register Now

Network

Provides a Civo Network resource. This can be used to create, modify, and delete Networks.

Example Usage

using Pulumi;
using Civo = Pulumi.Civo;

class MyStack : Stack
{
    public MyStack()
    {
        var customNet = new Civo.Network("customNet", new Civo.NetworkArgs
        {
            Label = "test_network",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-civo/sdk/go/civo"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := civo.NewNetwork(ctx, "customNet", &civo.NetworkArgs{
            Label: pulumi.String("test_network"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_civo as civo

custom_net = civo.Network("customNet", label="test_network")
import * as pulumi from "@pulumi/pulumi";
import * as civo from "@pulumi/civo";

const customNet = new civo.Network("custom_net", {
    label: "test_network",
});

Create a Network Resource

new Network(name: string, args: NetworkArgs, opts?: CustomResourceOptions);
def Network(resource_name: str, opts: Optional[ResourceOptions] = None, label: Optional[str] = None)
func NewNetwork(ctx *Context, name string, args NetworkArgs, opts ...ResourceOption) (*Network, error)
public Network(string name, NetworkArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args NetworkArgs
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 NetworkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args NetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Network Resource Properties

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

Inputs

The Network resource accepts the following input properties:

Label string

The Network label

Label string

The Network label

label string

The Network label

label str

The Network label

Outputs

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

Cidr string

The block ip assigned to the network.

Default bool

If is the default network.

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

The name of the network.

Region string

The region where the network was create.

Cidr string

The block ip assigned to the network.

Default bool

If is the default network.

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

The name of the network.

Region string

The region where the network was create.

cidr string

The block ip assigned to the network.

default boolean

If is the default network.

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

The name of the network.

region string

The region where the network was create.

cidr str

The block ip assigned to the network.

default bool

If is the default network.

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

The name of the network.

region str

The region where the network was create.

Look up an Existing Network Resource

Get an existing Network 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?: NetworkState, opts?: CustomResourceOptions): Network
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, cidr: Optional[str] = None, default: Optional[bool] = None, label: Optional[str] = None, name: Optional[str] = None, region: Optional[str] = None) -> Network
func GetNetwork(ctx *Context, name string, id IDInput, state *NetworkState, opts ...ResourceOption) (*Network, error)
public static Network Get(string name, Input<string> id, NetworkState? 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:

Cidr string

The block ip assigned to the network.

Default bool

If is the default network.

Label string

The Network label

Name string

The name of the network.

Region string

The region where the network was create.

Cidr string

The block ip assigned to the network.

Default bool

If is the default network.

Label string

The Network label

Name string

The name of the network.

Region string

The region where the network was create.

cidr string

The block ip assigned to the network.

default boolean

If is the default network.

label string

The Network label

name string

The name of the network.

region string

The region where the network was create.

cidr str

The block ip assigned to the network.

default bool

If is the default network.

label str

The Network label

name str

The name of the network.

region str

The region where the network was create.

Package Details

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