1. Packages
  2. Exoscale
  3. API Docs
  4. PrivateNetwork
Exoscale v0.57.0 published on Friday, Apr 19, 2024 by Pulumiverse

exoscale.PrivateNetwork

Explore with Pulumi AI

exoscale logo
Exoscale v0.57.0 published on Friday, Apr 19, 2024 by Pulumiverse

    Manage Exoscale Private Networks.

    Corresponding data source: exoscale_private_network.

    Example Usage

    Unmanaged private network:

    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumiverse/exoscale";
    
    const myPrivateNetwork = new exoscale.PrivateNetwork("myPrivateNetwork", {zone: "ch-gva-2"});
    
    import pulumi
    import pulumiverse_exoscale as exoscale
    
    my_private_network = exoscale.PrivateNetwork("myPrivateNetwork", zone="ch-gva-2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := exoscale.NewPrivateNetwork(ctx, "myPrivateNetwork", &exoscale.PrivateNetworkArgs{
    			Zone: pulumi.String("ch-gva-2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumiverse.Exoscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myPrivateNetwork = new Exoscale.PrivateNetwork("myPrivateNetwork", new()
        {
            Zone = "ch-gva-2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.PrivateNetwork;
    import com.pulumi.exoscale.PrivateNetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myPrivateNetwork = new PrivateNetwork("myPrivateNetwork", PrivateNetworkArgs.builder()        
                .zone("ch-gva-2")
                .build());
    
        }
    }
    
    resources:
      myPrivateNetwork:
        type: exoscale:PrivateNetwork
        properties:
          zone: ch-gva-2
    

    Managed private network:

    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumiverse/exoscale";
    
    const myManagedPrivateNetwork = new exoscale.PrivateNetwork("myManagedPrivateNetwork", {
        endIp: "10.0.0.253",
        netmask: "255.255.255.0",
        startIp: "10.0.0.20",
        zone: "ch-gva-2",
    });
    
    import pulumi
    import pulumiverse_exoscale as exoscale
    
    my_managed_private_network = exoscale.PrivateNetwork("myManagedPrivateNetwork",
        end_ip="10.0.0.253",
        netmask="255.255.255.0",
        start_ip="10.0.0.20",
        zone="ch-gva-2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := exoscale.NewPrivateNetwork(ctx, "myManagedPrivateNetwork", &exoscale.PrivateNetworkArgs{
    			EndIp:   pulumi.String("10.0.0.253"),
    			Netmask: pulumi.String("255.255.255.0"),
    			StartIp: pulumi.String("10.0.0.20"),
    			Zone:    pulumi.String("ch-gva-2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumiverse.Exoscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myManagedPrivateNetwork = new Exoscale.PrivateNetwork("myManagedPrivateNetwork", new()
        {
            EndIp = "10.0.0.253",
            Netmask = "255.255.255.0",
            StartIp = "10.0.0.20",
            Zone = "ch-gva-2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.PrivateNetwork;
    import com.pulumi.exoscale.PrivateNetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myManagedPrivateNetwork = new PrivateNetwork("myManagedPrivateNetwork", PrivateNetworkArgs.builder()        
                .endIp("10.0.0.253")
                .netmask("255.255.255.0")
                .startIp("10.0.0.20")
                .zone("ch-gva-2")
                .build());
    
        }
    }
    
    resources:
      myManagedPrivateNetwork:
        type: exoscale:PrivateNetwork
        properties:
          endIp: 10.0.0.253
          netmask: 255.255.255.0
          startIp: 10.0.0.20
          zone: ch-gva-2
    

    Please refer to the examples directory for complete configuration examples.

    Create PrivateNetwork Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PrivateNetwork(name: string, args: PrivateNetworkArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateNetwork(resource_name: str,
                       args: PrivateNetworkArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrivateNetwork(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       zone: Optional[str] = None,
                       description: Optional[str] = None,
                       end_ip: Optional[str] = None,
                       labels: Optional[Mapping[str, str]] = None,
                       name: Optional[str] = None,
                       netmask: Optional[str] = None,
                       start_ip: Optional[str] = None)
    func NewPrivateNetwork(ctx *Context, name string, args PrivateNetworkArgs, opts ...ResourceOption) (*PrivateNetwork, error)
    public PrivateNetwork(string name, PrivateNetworkArgs args, CustomResourceOptions? opts = null)
    public PrivateNetwork(String name, PrivateNetworkArgs args)
    public PrivateNetwork(String name, PrivateNetworkArgs args, CustomResourceOptions options)
    
    type: exoscale:PrivateNetwork
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PrivateNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrivateNetworkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrivateNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateNetworkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var privateNetworkResource = new Exoscale.PrivateNetwork("privateNetworkResource", new()
    {
        Zone = "string",
        Description = "string",
        EndIp = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Netmask = "string",
        StartIp = "string",
    });
    
    example, err := exoscale.NewPrivateNetwork(ctx, "privateNetworkResource", &exoscale.PrivateNetworkArgs{
    	Zone:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    	EndIp:       pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	Netmask: pulumi.String("string"),
    	StartIp: pulumi.String("string"),
    })
    
    var privateNetworkResource = new PrivateNetwork("privateNetworkResource", PrivateNetworkArgs.builder()        
        .zone("string")
        .description("string")
        .endIp("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .netmask("string")
        .startIp("string")
        .build());
    
    private_network_resource = exoscale.PrivateNetwork("privateNetworkResource",
        zone="string",
        description="string",
        end_ip="string",
        labels={
            "string": "string",
        },
        name="string",
        netmask="string",
        start_ip="string")
    
    const privateNetworkResource = new exoscale.PrivateNetwork("privateNetworkResource", {
        zone: "string",
        description: "string",
        endIp: "string",
        labels: {
            string: "string",
        },
        name: "string",
        netmask: "string",
        startIp: "string",
    });
    
    type: exoscale:PrivateNetwork
    properties:
        description: string
        endIp: string
        labels:
            string: string
        name: string
        netmask: string
        startIp: string
        zone: string
    

    PrivateNetwork Resource Properties

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

    Inputs

    The PrivateNetwork resource accepts the following input properties:

    Zone string
    ❗ The Exoscale Zone name.
    Description string
    A free-form text describing the network.
    EndIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Labels Dictionary<string, string>
    A map of key/value labels.
    Name string
    The private network name.
    Netmask string
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    StartIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Zone string
    ❗ The Exoscale Zone name.
    Description string
    A free-form text describing the network.
    EndIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Labels map[string]string
    A map of key/value labels.
    Name string
    The private network name.
    Netmask string
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    StartIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone String
    ❗ The Exoscale Zone name.
    description String
    A free-form text describing the network.
    endIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels Map<String,String>
    A map of key/value labels.
    name String
    The private network name.
    netmask String
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    startIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone string
    ❗ The Exoscale Zone name.
    description string
    A free-form text describing the network.
    endIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels {[key: string]: string}
    A map of key/value labels.
    name string
    The private network name.
    netmask string
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    startIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone str
    ❗ The Exoscale Zone name.
    description str
    A free-form text describing the network.
    end_ip str
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels Mapping[str, str]
    A map of key/value labels.
    name str
    The private network name.
    netmask str
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    start_ip str
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone String
    ❗ The Exoscale Zone name.
    description String
    A free-form text describing the network.
    endIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels Map<String>
    A map of key/value labels.
    name String
    The private network name.
    netmask String
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    startIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PrivateNetwork Resource

    Get an existing PrivateNetwork 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?: PrivateNetworkState, opts?: CustomResourceOptions): PrivateNetwork
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            end_ip: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            netmask: Optional[str] = None,
            start_ip: Optional[str] = None,
            zone: Optional[str] = None) -> PrivateNetwork
    func GetPrivateNetwork(ctx *Context, name string, id IDInput, state *PrivateNetworkState, opts ...ResourceOption) (*PrivateNetwork, error)
    public static PrivateNetwork Get(string name, Input<string> id, PrivateNetworkState? state, CustomResourceOptions? opts = null)
    public static PrivateNetwork get(String name, Output<String> id, PrivateNetworkState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Description string
    A free-form text describing the network.
    EndIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Labels Dictionary<string, string>
    A map of key/value labels.
    Name string
    The private network name.
    Netmask string
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    StartIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Zone string
    ❗ The Exoscale Zone name.
    Description string
    A free-form text describing the network.
    EndIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Labels map[string]string
    A map of key/value labels.
    Name string
    The private network name.
    Netmask string
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    StartIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    Zone string
    ❗ The Exoscale Zone name.
    description String
    A free-form text describing the network.
    endIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels Map<String,String>
    A map of key/value labels.
    name String
    The private network name.
    netmask String
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    startIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone String
    ❗ The Exoscale Zone name.
    description string
    A free-form text describing the network.
    endIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels {[key: string]: string}
    A map of key/value labels.
    name string
    The private network name.
    netmask string
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    startIp string
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone string
    ❗ The Exoscale Zone name.
    description str
    A free-form text describing the network.
    end_ip str
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels Mapping[str, str]
    A map of key/value labels.
    name str
    The private network name.
    netmask str
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    start_ip str
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone str
    ❗ The Exoscale Zone name.
    description String
    A free-form text describing the network.
    endIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    labels Map<String>
    A map of key/value labels.
    name String
    The private network name.
    netmask String
    (For managed Privnets) The network mask defining the IPv4 network allowed for static leases.
    startIp String
    (For managed Privnets) The first/last IPv4 addresses used by the DHCP service for dynamic leases.
    zone String
    ❗ The Exoscale Zone name.

    Import

    An existing private network may be imported by <ID>@<zone>:

    $ pulumi import exoscale:index/privateNetwork:PrivateNetwork \
    

    exoscale_private_network.my_private_network \

    f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    exoscale pulumiverse/pulumi-exoscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the exoscale Terraform Provider.
    exoscale logo
    Exoscale v0.57.0 published on Friday, Apr 19, 2024 by Pulumiverse