ovh.CloudProject.RegionNetwork
Explore with Pulumi AI
Creates a network in a public cloud project.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.CloudProject.RegionNetwork;
import com.pulumi.ovh.CloudProject.RegionNetworkArgs;
import com.pulumi.ovh.CloudProject.inputs.RegionNetworkSubnetArgs;
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 RegionNetwork("net", RegionNetworkArgs.builder()
.regionName("EU-SOUTH-LZ-MAD-A")
.serviceName("XXXXXX")
.subnet(RegionNetworkSubnetArgs.builder()
.cidr("10.0.0.0/24")
.enable_dhcp(true)
.enable_gateway_ip(false)
.ip_version(4)
.build())
.build());
}
}
resources:
net:
type: ovh:CloudProject:RegionNetwork
properties:
regionName: EU-SOUTH-LZ-MAD-A
serviceName: XXXXXX
subnet:
cidr: 10.0.0.0/24
enable_dhcp: true
enable_gateway_ip: false
ip_version: 4
Create RegionNetwork Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RegionNetwork(name: string, args: RegionNetworkArgs, opts?: CustomResourceOptions);
@overload
def RegionNetwork(resource_name: str,
args: RegionNetworkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RegionNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
region_name: Optional[str] = None,
service_name: Optional[str] = None,
subnet: Optional[_cloudproject.RegionNetworkSubnetArgs] = None,
name: Optional[str] = None,
vlan_id: Optional[float] = None)
func NewRegionNetwork(ctx *Context, name string, args RegionNetworkArgs, opts ...ResourceOption) (*RegionNetwork, error)
public RegionNetwork(string name, RegionNetworkArgs args, CustomResourceOptions? opts = null)
public RegionNetwork(String name, RegionNetworkArgs args)
public RegionNetwork(String name, RegionNetworkArgs args, CustomResourceOptions options)
type: ovh:CloudProject:RegionNetwork
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 RegionNetworkArgs
- 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 RegionNetworkArgs
- 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 RegionNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegionNetworkArgs
- 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 regionNetworkResource = new Ovh.CloudProject.RegionNetwork("regionNetworkResource", new()
{
RegionName = "string",
ServiceName = "string",
Subnet = new Ovh.CloudProject.Inputs.RegionNetworkSubnetArgs
{
Cidr = "string",
EnableDhcp = false,
EnableGatewayIp = false,
IpVersion = 0,
AllocationPools = new[]
{
new Ovh.CloudProject.Inputs.RegionNetworkSubnetAllocationPoolArgs
{
End = "string",
Start = "string",
},
},
DnsNameServers = new[]
{
"string",
},
GatewayIp = "string",
HostRoutes = new[]
{
new Ovh.CloudProject.Inputs.RegionNetworkSubnetHostRouteArgs
{
Destination = "string",
NextHop = "string",
},
},
Name = "string",
UseDefaultPublicDnsresolver = false,
},
Name = "string",
VlanId = 0,
});
example, err := CloudProject.NewRegionNetwork(ctx, "regionNetworkResource", &CloudProject.RegionNetworkArgs{
RegionName: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Subnet: &cloudproject.RegionNetworkSubnetArgs{
Cidr: pulumi.String("string"),
EnableDhcp: pulumi.Bool(false),
EnableGatewayIp: pulumi.Bool(false),
IpVersion: pulumi.Float64(0),
AllocationPools: cloudproject.RegionNetworkSubnetAllocationPoolArray{
&cloudproject.RegionNetworkSubnetAllocationPoolArgs{
End: pulumi.String("string"),
Start: pulumi.String("string"),
},
},
DnsNameServers: pulumi.StringArray{
pulumi.String("string"),
},
GatewayIp: pulumi.String("string"),
HostRoutes: cloudproject.RegionNetworkSubnetHostRouteArray{
&cloudproject.RegionNetworkSubnetHostRouteArgs{
Destination: pulumi.String("string"),
NextHop: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
UseDefaultPublicDnsresolver: pulumi.Bool(false),
},
Name: pulumi.String("string"),
VlanId: pulumi.Float64(0),
})
var regionNetworkResource = new RegionNetwork("regionNetworkResource", RegionNetworkArgs.builder()
.regionName("string")
.serviceName("string")
.subnet(RegionNetworkSubnetArgs.builder()
.cidr("string")
.enableDhcp(false)
.enableGatewayIp(false)
.ipVersion(0)
.allocationPools(RegionNetworkSubnetAllocationPoolArgs.builder()
.end("string")
.start("string")
.build())
.dnsNameServers("string")
.gatewayIp("string")
.hostRoutes(RegionNetworkSubnetHostRouteArgs.builder()
.destination("string")
.nextHop("string")
.build())
.name("string")
.useDefaultPublicDnsresolver(false)
.build())
.name("string")
.vlanId(0)
.build());
region_network_resource = ovh.cloud_project.RegionNetwork("regionNetworkResource",
region_name="string",
service_name="string",
subnet={
"cidr": "string",
"enable_dhcp": False,
"enable_gateway_ip": False,
"ip_version": 0,
"allocation_pools": [{
"end": "string",
"start": "string",
}],
"dns_name_servers": ["string"],
"gateway_ip": "string",
"host_routes": [{
"destination": "string",
"next_hop": "string",
}],
"name": "string",
"use_default_public_dnsresolver": False,
},
name="string",
vlan_id=0)
const regionNetworkResource = new ovh.cloudproject.RegionNetwork("regionNetworkResource", {
regionName: "string",
serviceName: "string",
subnet: {
cidr: "string",
enableDhcp: false,
enableGatewayIp: false,
ipVersion: 0,
allocationPools: [{
end: "string",
start: "string",
}],
dnsNameServers: ["string"],
gatewayIp: "string",
hostRoutes: [{
destination: "string",
nextHop: "string",
}],
name: "string",
useDefaultPublicDnsresolver: false,
},
name: "string",
vlanId: 0,
});
type: ovh:CloudProject:RegionNetwork
properties:
name: string
regionName: string
serviceName: string
subnet:
allocationPools:
- end: string
start: string
cidr: string
dnsNameServers:
- string
enableDhcp: false
enableGatewayIp: false
gatewayIp: string
hostRoutes:
- destination: string
nextHop: string
ipVersion: 0
name: string
useDefaultPublicDnsresolver: false
vlanId: 0
RegionNetwork Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RegionNetwork resource accepts the following input properties:
- Region
Name string - Network region
- Service
Name string - The id of the public cloud project
- Subnet
Region
Network Subnet - Parameters to create a subnet
- Name string
- Name of the network
- Vlan
Id double - VLAN ID, between 1 and 4000
- Region
Name string - Network region
- Service
Name string - The id of the public cloud project
- Subnet
Region
Network Subnet Args - Parameters to create a subnet
- Name string
- Name of the network
- Vlan
Id float64 - VLAN ID, between 1 and 4000
- region
Name String - Network region
- service
Name String - The id of the public cloud project
- subnet
Region
Network Subnet - Parameters to create a subnet
- name String
- Name of the network
- vlan
Id Double - VLAN ID, between 1 and 4000
- region
Name string - Network region
- service
Name string - The id of the public cloud project
- subnet
Region
Network Subnet - Parameters to create a subnet
- name string
- Name of the network
- vlan
Id number - VLAN ID, between 1 and 4000
- region_
name str - Network region
- service_
name str - The id of the public cloud project
- subnet
cloudproject.
Region Network Subnet Args - Parameters to create a subnet
- name str
- Name of the network
- vlan_
id float - VLAN ID, between 1 and 4000
- region
Name String - Network region
- service
Name String - The id of the public cloud project
- subnet Property Map
- Parameters to create a subnet
- name String
- Name of the network
- vlan
Id Number - VLAN ID, between 1 and 4000
Outputs
All input properties are implicitly available as output properties. Additionally, the RegionNetwork resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Network region returned by the API
- Visibility string
- Network visibility
- Id string
- The provider-assigned unique ID for this managed resource.
- Region string
- Network region returned by the API
- Visibility string
- Network visibility
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- Network region returned by the API
- visibility String
- Network visibility
- id string
- The provider-assigned unique ID for this managed resource.
- region string
- Network region returned by the API
- visibility string
- Network visibility
- id str
- The provider-assigned unique ID for this managed resource.
- region str
- Network region returned by the API
- visibility str
- Network visibility
- id String
- The provider-assigned unique ID for this managed resource.
- region String
- Network region returned by the API
- visibility String
- Network visibility
Look up Existing RegionNetwork Resource
Get an existing RegionNetwork 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?: RegionNetworkState, opts?: CustomResourceOptions): RegionNetwork
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
region: Optional[str] = None,
region_name: Optional[str] = None,
service_name: Optional[str] = None,
subnet: Optional[_cloudproject.RegionNetworkSubnetArgs] = None,
visibility: Optional[str] = None,
vlan_id: Optional[float] = None) -> RegionNetwork
func GetRegionNetwork(ctx *Context, name string, id IDInput, state *RegionNetworkState, opts ...ResourceOption) (*RegionNetwork, error)
public static RegionNetwork Get(string name, Input<string> id, RegionNetworkState? state, CustomResourceOptions? opts = null)
public static RegionNetwork get(String name, Output<String> id, RegionNetworkState state, CustomResourceOptions options)
resources: _: type: ovh:CloudProject:RegionNetwork get: id: ${id}
- 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
- Name of the network
- Region string
- Network region returned by the API
- Region
Name string - Network region
- Service
Name string - The id of the public cloud project
- Subnet
Region
Network Subnet - Parameters to create a subnet
- Visibility string
- Network visibility
- Vlan
Id double - VLAN ID, between 1 and 4000
- Name string
- Name of the network
- Region string
- Network region returned by the API
- Region
Name string - Network region
- Service
Name string - The id of the public cloud project
- Subnet
Region
Network Subnet Args - Parameters to create a subnet
- Visibility string
- Network visibility
- Vlan
Id float64 - VLAN ID, between 1 and 4000
- name String
- Name of the network
- region String
- Network region returned by the API
- region
Name String - Network region
- service
Name String - The id of the public cloud project
- subnet
Region
Network Subnet - Parameters to create a subnet
- visibility String
- Network visibility
- vlan
Id Double - VLAN ID, between 1 and 4000
- name string
- Name of the network
- region string
- Network region returned by the API
- region
Name string - Network region
- service
Name string - The id of the public cloud project
- subnet
Region
Network Subnet - Parameters to create a subnet
- visibility string
- Network visibility
- vlan
Id number - VLAN ID, between 1 and 4000
- name str
- Name of the network
- region str
- Network region returned by the API
- region_
name str - Network region
- service_
name str - The id of the public cloud project
- subnet
cloudproject.
Region Network Subnet Args - Parameters to create a subnet
- visibility str
- Network visibility
- vlan_
id float - VLAN ID, between 1 and 4000
- name String
- Name of the network
- region String
- Network region returned by the API
- region
Name String - Network region
- service
Name String - The id of the public cloud project
- subnet Property Map
- Parameters to create a subnet
- visibility String
- Network visibility
- vlan
Id Number - VLAN ID, between 1 and 4000
Supporting Types
RegionNetworkSubnet, RegionNetworkSubnetArgs
- Cidr string
- Subnet range in CIDR notation
- Enable
Dhcp bool - Enable DHCP for the subnet
- Enable
Gateway boolIp - Set a gateway ip for the subnet
- Ip
Version double - IP version
- Allocation
Pools List<RegionNetwork Subnet Allocation Pool> - List of IP pools allocated in subnet
- Dns
Name List<string>Servers - DNS nameservers
- Gateway
Ip string - Gateway IP
- Host
Routes List<RegionNetwork Subnet Host Route> - Host routes
- Name string
- Subnet name
- Use
Default boolPublic Dnsresolver - Use default DNS
- Cidr string
- Subnet range in CIDR notation
- Enable
Dhcp bool - Enable DHCP for the subnet
- Enable
Gateway boolIp - Set a gateway ip for the subnet
- Ip
Version float64 - IP version
- Allocation
Pools []RegionNetwork Subnet Allocation Pool - List of IP pools allocated in subnet
- Dns
Name []stringServers - DNS nameservers
- Gateway
Ip string - Gateway IP
- Host
Routes []RegionNetwork Subnet Host Route - Host routes
- Name string
- Subnet name
- Use
Default boolPublic Dnsresolver - Use default DNS
- cidr String
- Subnet range in CIDR notation
- enable
Dhcp Boolean - Enable DHCP for the subnet
- enable
Gateway BooleanIp - Set a gateway ip for the subnet
- ip
Version Double - IP version
- allocation
Pools List<RegionNetwork Subnet Allocation Pool> - List of IP pools allocated in subnet
- dns
Name List<String>Servers - DNS nameservers
- gateway
Ip String - Gateway IP
- host
Routes List<RegionNetwork Subnet Host Route> - Host routes
- name String
- Subnet name
- use
Default BooleanPublic Dnsresolver - Use default DNS
- cidr string
- Subnet range in CIDR notation
- enable
Dhcp boolean - Enable DHCP for the subnet
- enable
Gateway booleanIp - Set a gateway ip for the subnet
- ip
Version number - IP version
- allocation
Pools RegionNetwork Subnet Allocation Pool[] - List of IP pools allocated in subnet
- dns
Name string[]Servers - DNS nameservers
- gateway
Ip string - Gateway IP
- host
Routes RegionNetwork Subnet Host Route[] - Host routes
- name string
- Subnet name
- use
Default booleanPublic Dnsresolver - Use default DNS
- cidr str
- Subnet range in CIDR notation
- enable_
dhcp bool - Enable DHCP for the subnet
- enable_
gateway_ boolip - Set a gateway ip for the subnet
- ip_
version float - IP version
- allocation_
pools Sequence[cloudproject.Region Network Subnet Allocation Pool] - List of IP pools allocated in subnet
- dns_
name_ Sequence[str]servers - DNS nameservers
- gateway_
ip str - Gateway IP
- host_
routes Sequence[cloudproject.Region Network Subnet Host Route] - Host routes
- name str
- Subnet name
- use_
default_ boolpublic_ dnsresolver - Use default DNS
- cidr String
- Subnet range in CIDR notation
- enable
Dhcp Boolean - Enable DHCP for the subnet
- enable
Gateway BooleanIp - Set a gateway ip for the subnet
- ip
Version Number - IP version
- allocation
Pools List<Property Map> - List of IP pools allocated in subnet
- dns
Name List<String>Servers - DNS nameservers
- gateway
Ip String - Gateway IP
- host
Routes List<Property Map> - Host routes
- name String
- Subnet name
- use
Default BooleanPublic Dnsresolver - Use default DNS
RegionNetworkSubnetAllocationPool, RegionNetworkSubnetAllocationPoolArgs
RegionNetworkSubnetHostRoute, RegionNetworkSubnetHostRouteArgs
- Destination string
- Host route destination (eg: 192.168.1.0/24)
- Next
Hop string - Host route next hop (eg: 192.168.1.254)
- Destination string
- Host route destination (eg: 192.168.1.0/24)
- Next
Hop string - Host route next hop (eg: 192.168.1.254)
- destination String
- Host route destination (eg: 192.168.1.0/24)
- next
Hop String - Host route next hop (eg: 192.168.1.254)
- destination string
- Host route destination (eg: 192.168.1.0/24)
- next
Hop string - Host route next hop (eg: 192.168.1.254)
- destination str
- Host route destination (eg: 192.168.1.0/24)
- next_
hop str - Host route next hop (eg: 192.168.1.254)
- destination String
- Host route destination (eg: 192.168.1.0/24)
- next
Hop String - Host route next hop (eg: 192.168.1.254)
Import
A network in a public cloud project can be imported using the service_name
, region_name
and id
attributes.
Using the following configuration:
hcl
import {
id = “<service_name>/<region_name>/
to = ovh_cloud_project_region_network.test
}
You can then run:
bash
$ pulumi preview -generate-config-out=network.tf
$ pulumi up
The file network.tf
will then contain the imported resource’s configuration, that can be copied next to the import
block above.
See https://developer.hashicorp.com/terraform/language/import/generating-configuration for more details.
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.