1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. NetworkPrivate
OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud

ovh.CloudProject.NetworkPrivate

Explore with Pulumi AI

ovh logo
OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud

    Creates a private network in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const net = new ovh.cloudproject.NetworkPrivate("net", {
        regions: [
            "GRA1",
            "BHS1",
        ],
        serviceName: "XXXXXX",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    net = ovh.cloud_project.NetworkPrivate("net",
        regions=[
            "GRA1",
            "BHS1",
        ],
        service_name="XXXXXX")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/CloudProject"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := CloudProject.NewNetworkPrivate(ctx, "net", &CloudProject.NetworkPrivateArgs{
    			Regions: pulumi.StringArray{
    				pulumi.String("GRA1"),
    				pulumi.String("BHS1"),
    			},
    			ServiceName: pulumi.String("XXXXXX"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var net = new Ovh.CloudProject.NetworkPrivate("net", new()
        {
            Regions = new[]
            {
                "GRA1",
                "BHS1",
            },
            ServiceName = "XXXXXX",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.CloudProject.NetworkPrivate;
    import com.pulumi.ovh.CloudProject.NetworkPrivateArgs;
    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 net = new NetworkPrivate("net", NetworkPrivateArgs.builder()        
                .regions(            
                    "GRA1",
                    "BHS1")
                .serviceName("XXXXXX")
                .build());
    
        }
    }
    
    resources:
      net:
        type: ovh:CloudProject:NetworkPrivate
        properties:
          regions:
            - GRA1
            - BHS1
          serviceName: XXXXXX
    

    Create NetworkPrivate Resource

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

    Constructor syntax

    new NetworkPrivate(name: string, args: NetworkPrivateArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkPrivate(resource_name: str,
                       args: NetworkPrivateArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkPrivate(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       service_name: Optional[str] = None,
                       name: Optional[str] = None,
                       regions: Optional[Sequence[str]] = None,
                       vlan_id: Optional[int] = None)
    func NewNetworkPrivate(ctx *Context, name string, args NetworkPrivateArgs, opts ...ResourceOption) (*NetworkPrivate, error)
    public NetworkPrivate(string name, NetworkPrivateArgs args, CustomResourceOptions? opts = null)
    public NetworkPrivate(String name, NetworkPrivateArgs args)
    public NetworkPrivate(String name, NetworkPrivateArgs args, CustomResourceOptions options)
    
    type: ovh:CloudProject:NetworkPrivate
    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 NetworkPrivateArgs
    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 NetworkPrivateArgs
    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 NetworkPrivateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkPrivateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkPrivateArgs
    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 networkPrivateResource = new Ovh.CloudProject.NetworkPrivate("networkPrivateResource", new()
    {
        ServiceName = "string",
        Name = "string",
        Regions = new[]
        {
            "string",
        },
        VlanId = 0,
    });
    
    example, err := CloudProject.NewNetworkPrivate(ctx, "networkPrivateResource", &CloudProject.NetworkPrivateArgs{
    	ServiceName: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Regions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	VlanId: pulumi.Int(0),
    })
    
    var networkPrivateResource = new NetworkPrivate("networkPrivateResource", NetworkPrivateArgs.builder()        
        .serviceName("string")
        .name("string")
        .regions("string")
        .vlanId(0)
        .build());
    
    network_private_resource = ovh.cloud_project.NetworkPrivate("networkPrivateResource",
        service_name="string",
        name="string",
        regions=["string"],
        vlan_id=0)
    
    const networkPrivateResource = new ovh.cloudproject.NetworkPrivate("networkPrivateResource", {
        serviceName: "string",
        name: "string",
        regions: ["string"],
        vlanId: 0,
    });
    
    type: ovh:CloudProject:NetworkPrivate
    properties:
        name: string
        regions:
            - string
        serviceName: string
        vlanId: 0
    

    NetworkPrivate 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 NetworkPrivate resource accepts the following input properties:

    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    The name of the network.
    Regions List<string>
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    VlanId int
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Name string
    The name of the network.
    Regions []string
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    VlanId int
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    The name of the network.
    regions List<String>
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    vlanId Integer
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name string
    The name of the network.
    regions string[]
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    vlanId number
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name str
    The name of the network.
    regions Sequence[str]
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    vlan_id int
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    name String
    The name of the network.
    regions List<String>
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    vlanId Number
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RegionsAttributes List<NetworkPrivateRegionsAttribute>
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    RegionsStatuses List<NetworkPrivateRegionsStatus>
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Type string
    the type of the network. Either 'private' or 'public'.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionsAttributes []NetworkPrivateRegionsAttribute
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    RegionsStatuses []NetworkPrivateRegionsStatus
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Type string
    the type of the network. Either 'private' or 'public'.
    id String
    The provider-assigned unique ID for this managed resource.
    regionsAttributes List<NetworkPrivateRegionsAttribute>
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regionsStatuses List<NetworkPrivateRegionsStatus>
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    status String
    the status of the network. should be normally set to 'ACTIVE'.
    type String
    the type of the network. Either 'private' or 'public'.
    id string
    The provider-assigned unique ID for this managed resource.
    regionsAttributes NetworkPrivateRegionsAttribute[]
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regionsStatuses NetworkPrivateRegionsStatus[]
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    status string
    the status of the network. should be normally set to 'ACTIVE'.
    type string
    the type of the network. Either 'private' or 'public'.
    id str
    The provider-assigned unique ID for this managed resource.
    regions_attributes Sequence[cloudproject.NetworkPrivateRegionsAttribute]
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regions_statuses Sequence[cloudproject.NetworkPrivateRegionsStatus]
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    status str
    the status of the network. should be normally set to 'ACTIVE'.
    type str
    the type of the network. Either 'private' or 'public'.
    id String
    The provider-assigned unique ID for this managed resource.
    regionsAttributes List<Property Map>
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regionsStatuses List<Property Map>
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    status String
    the status of the network. should be normally set to 'ACTIVE'.
    type String
    the type of the network. Either 'private' or 'public'.

    Look up Existing NetworkPrivate Resource

    Get an existing NetworkPrivate 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?: NetworkPrivateState, opts?: CustomResourceOptions): NetworkPrivate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            regions: Optional[Sequence[str]] = None,
            regions_attributes: Optional[Sequence[_cloudproject.NetworkPrivateRegionsAttributeArgs]] = None,
            regions_statuses: Optional[Sequence[_cloudproject.NetworkPrivateRegionsStatusArgs]] = None,
            service_name: Optional[str] = None,
            status: Optional[str] = None,
            type: Optional[str] = None,
            vlan_id: Optional[int] = None) -> NetworkPrivate
    func GetNetworkPrivate(ctx *Context, name string, id IDInput, state *NetworkPrivateState, opts ...ResourceOption) (*NetworkPrivate, error)
    public static NetworkPrivate Get(string name, Input<string> id, NetworkPrivateState? state, CustomResourceOptions? opts = null)
    public static NetworkPrivate get(String name, Output<String> id, NetworkPrivateState 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:
    Name string
    The name of the network.
    Regions List<string>
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    RegionsAttributes List<NetworkPrivateRegionsAttribute>
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    RegionsStatuses List<NetworkPrivateRegionsStatus>
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Type string
    the type of the network. Either 'private' or 'public'.
    VlanId int
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    Name string
    The name of the network.
    Regions []string
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    RegionsAttributes []NetworkPrivateRegionsAttributeArgs
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    RegionsStatuses []NetworkPrivateRegionsStatusArgs
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    ServiceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Type string
    the type of the network. Either 'private' or 'public'.
    VlanId int
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    name String
    The name of the network.
    regions List<String>
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    regionsAttributes List<NetworkPrivateRegionsAttribute>
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regionsStatuses List<NetworkPrivateRegionsStatus>
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    status String
    the status of the network. should be normally set to 'ACTIVE'.
    type String
    the type of the network. Either 'private' or 'public'.
    vlanId Integer
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    name string
    The name of the network.
    regions string[]
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    regionsAttributes NetworkPrivateRegionsAttribute[]
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regionsStatuses NetworkPrivateRegionsStatus[]
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    serviceName string
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    status string
    the status of the network. should be normally set to 'ACTIVE'.
    type string
    the type of the network. Either 'private' or 'public'.
    vlanId number
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    name str
    The name of the network.
    regions Sequence[str]
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    regions_attributes Sequence[cloudproject.NetworkPrivateRegionsAttributeArgs]
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regions_statuses Sequence[cloudproject.NetworkPrivateRegionsStatusArgs]
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    service_name str
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    status str
    the status of the network. should be normally set to 'ACTIVE'.
    type str
    the type of the network. Either 'private' or 'public'.
    vlan_id int
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
    name String
    The name of the network.
    regions List<String>
    an array of valid OVHcloud public cloud region ID in which the network will be available. Ex.: "GRA1". Defaults to all public cloud regions.
    regionsAttributes List<Property Map>
    A map representing information about the region.

    • regions_attributes/region - The id of the region.
    • regions_attributes/status - The status of the network in the region.
    • regions_attributes/openstackid - The private network id in the region.
    regionsStatuses List<Property Map>
    (Deprecated) A map representing the status of the network per region.

    • regions_status/region - (Deprecated) The id of the region.
    • regions_status/status - (Deprecated) The status of the network in the region.

    Deprecated: use the regions_attributes field instead

    serviceName String
    The id of the public cloud project. If omitted, the OVH_CLOUD_PROJECT_SERVICE environment variable is used.
    status String
    the status of the network. should be normally set to 'ACTIVE'.
    type String
    the type of the network. Either 'private' or 'public'.
    vlanId Number
    a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.

    Supporting Types

    NetworkPrivateRegionsAttribute, NetworkPrivateRegionsAttributeArgs

    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Openstackid string
    Region string
    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Openstackid string
    Region string
    status String
    the status of the network. should be normally set to 'ACTIVE'.
    openstackid String
    region String
    status string
    the status of the network. should be normally set to 'ACTIVE'.
    openstackid string
    region string
    status str
    the status of the network. should be normally set to 'ACTIVE'.
    openstackid str
    region str
    status String
    the status of the network. should be normally set to 'ACTIVE'.
    openstackid String
    region String

    NetworkPrivateRegionsStatus, NetworkPrivateRegionsStatusArgs

    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Region string
    Status string
    the status of the network. should be normally set to 'ACTIVE'.
    Region string
    status String
    the status of the network. should be normally set to 'ACTIVE'.
    region String
    status string
    the status of the network. should be normally set to 'ACTIVE'.
    region string
    status str
    the status of the network. should be normally set to 'ACTIVE'.
    region str
    status String
    the status of the network. should be normally set to 'ACTIVE'.
    region String

    Import

    Private network in a public cloud project can be imported using the service_name and the network_id, separated by “/” E.g.,

    bash

    $ pulumi import ovh:CloudProject/networkPrivate:NetworkPrivate mynet ookie9mee8Shaeghaeleeju7Xeghohv6e/pn-12345678
    

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

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    OVHCloud v0.43.1 published on Tuesday, Apr 23, 2024 by OVHcloud