ovh.CloudProject.NetworkPrivate
Explore with Pulumi AI
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.
Constructor 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:
- Service
Name 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.
- Vlan
Id int - a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
- Service
Name 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.
- Vlan
Id int - a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
- service
Name 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.
- vlan
Id Integer - a vlan id to associate with the network. Changing this value recreates the resource. Defaults to 0.
- service
Name 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.
- vlan
Id 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.
- service
Name 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.
- vlan
Id 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.
- Regions
Attributes List<NetworkPrivate Regions Attribute> - 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 List<NetworkPrivate Regions Status> - (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.
- 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.
- Regions
Attributes []NetworkPrivate Regions Attribute - 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 []NetworkPrivate Regions Status - (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.
- 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.
- regions
Attributes List<NetworkPrivate Regions Attribute> - 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 List<NetworkPrivate Regions Status> - (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.
- 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.
- regions
Attributes NetworkPrivate Regions Attribute[] - 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 NetworkPrivate Regions Status[] - (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.
- 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.Network Private Regions Attribute] - 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.Network Private Regions Status] - (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.
- 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.
- regions
Attributes 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.
- regions
Statuses 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.
- 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.
- 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.
- Regions
Attributes List<NetworkPrivate Regions Attribute> - 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 List<NetworkPrivate Regions Status> - (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.
- Service
Name 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'.
- 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 []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.
- Regions
Attributes []NetworkPrivate Regions Attribute Args - 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 []NetworkPrivate Regions Status Args - (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.
- Service
Name 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'.
- 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.
- regions
Attributes List<NetworkPrivate Regions Attribute> - 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 List<NetworkPrivate Regions Status> - (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.
- service
Name 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'.
- vlan
Id 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.
- regions
Attributes NetworkPrivate Regions Attribute[] - 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 NetworkPrivate Regions Status[] - (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.
- service
Name 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'.
- vlan
Id 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.Network Private Regions Attribute Args] - 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.Network Private Regions Status Args] - (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.
- 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.
- regions
Attributes 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.
- regions
Statuses 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.
- service
Name 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'.
- vlan
Id 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
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.