opentelekomcloud.NetworkingSubnetV2
Explore with Pulumi AI
Up-to-date reference of API arguments for VPC subnet you can get at documentation portal
Manages a V2 Neutron subnet resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const network1 = new opentelekomcloud.NetworkingNetworkV2("network1", {adminStateUp: "true"});
const subnet1 = new opentelekomcloud.NetworkingSubnetV2("subnet1", {
networkId: network1.networkingNetworkV2Id,
cidr: "192.168.199.0/24",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
network1 = opentelekomcloud.NetworkingNetworkV2("network1", admin_state_up="true")
subnet1 = opentelekomcloud.NetworkingSubnetV2("subnet1",
network_id=network1.networking_network_v2_id,
cidr="192.168.199.0/24")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
network1, err := opentelekomcloud.NewNetworkingNetworkV2(ctx, "network1", &opentelekomcloud.NetworkingNetworkV2Args{
AdminStateUp: pulumi.String("true"),
})
if err != nil {
return err
}
_, err = opentelekomcloud.NewNetworkingSubnetV2(ctx, "subnet1", &opentelekomcloud.NetworkingSubnetV2Args{
NetworkId: network1.NetworkingNetworkV2Id,
Cidr: pulumi.String("192.168.199.0/24"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var network1 = new Opentelekomcloud.NetworkingNetworkV2("network1", new()
{
AdminStateUp = "true",
});
var subnet1 = new Opentelekomcloud.NetworkingSubnetV2("subnet1", new()
{
NetworkId = network1.NetworkingNetworkV2Id,
Cidr = "192.168.199.0/24",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2;
import com.pulumi.opentelekomcloud.NetworkingNetworkV2Args;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2;
import com.pulumi.opentelekomcloud.NetworkingSubnetV2Args;
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 network1 = new NetworkingNetworkV2("network1", NetworkingNetworkV2Args.builder()
.adminStateUp("true")
.build());
var subnet1 = new NetworkingSubnetV2("subnet1", NetworkingSubnetV2Args.builder()
.networkId(network1.networkingNetworkV2Id())
.cidr("192.168.199.0/24")
.build());
}
}
resources:
network1:
type: opentelekomcloud:NetworkingNetworkV2
properties:
adminStateUp: 'true'
subnet1:
type: opentelekomcloud:NetworkingSubnetV2
properties:
networkId: ${network1.networkingNetworkV2Id}
cidr: 192.168.199.0/24
Create NetworkingSubnetV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingSubnetV2(name: string, args: NetworkingSubnetV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingSubnetV2(resource_name: str,
args: NetworkingSubnetV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkingSubnetV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
cidr: Optional[str] = None,
ip_version: Optional[float] = None,
enable_dhcp: Optional[bool] = None,
gateway_ip: Optional[str] = None,
host_routes: Optional[Sequence[NetworkingSubnetV2HostRouteArgs]] = None,
allocation_pools: Optional[Sequence[NetworkingSubnetV2AllocationPoolArgs]] = None,
name: Optional[str] = None,
dns_nameservers: Optional[Sequence[str]] = None,
networking_subnet_v2_id: Optional[str] = None,
no_gateway: Optional[bool] = None,
region: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[NetworkingSubnetV2TimeoutsArgs] = None,
value_specs: Optional[Mapping[str, str]] = None)
func NewNetworkingSubnetV2(ctx *Context, name string, args NetworkingSubnetV2Args, opts ...ResourceOption) (*NetworkingSubnetV2, error)
public NetworkingSubnetV2(string name, NetworkingSubnetV2Args args, CustomResourceOptions? opts = null)
public NetworkingSubnetV2(String name, NetworkingSubnetV2Args args)
public NetworkingSubnetV2(String name, NetworkingSubnetV2Args args, CustomResourceOptions options)
type: opentelekomcloud:NetworkingSubnetV2
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 NetworkingSubnetV2Args
- 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 NetworkingSubnetV2Args
- 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 NetworkingSubnetV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingSubnetV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingSubnetV2Args
- 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 networkingSubnetV2Resource = new Opentelekomcloud.NetworkingSubnetV2("networkingSubnetV2Resource", new()
{
NetworkId = "string",
Cidr = "string",
IpVersion = 0,
EnableDhcp = false,
GatewayIp = "string",
HostRoutes = new[]
{
new Opentelekomcloud.Inputs.NetworkingSubnetV2HostRouteArgs
{
DestinationCidr = "string",
NextHop = "string",
},
},
AllocationPools = new[]
{
new Opentelekomcloud.Inputs.NetworkingSubnetV2AllocationPoolArgs
{
End = "string",
Start = "string",
},
},
Name = "string",
DnsNameservers = new[]
{
"string",
},
NetworkingSubnetV2Id = "string",
NoGateway = false,
Region = "string",
TenantId = "string",
Timeouts = new Opentelekomcloud.Inputs.NetworkingSubnetV2TimeoutsArgs
{
Create = "string",
Delete = "string",
},
ValueSpecs =
{
{ "string", "string" },
},
});
example, err := opentelekomcloud.NewNetworkingSubnetV2(ctx, "networkingSubnetV2Resource", &opentelekomcloud.NetworkingSubnetV2Args{
NetworkId: pulumi.String("string"),
Cidr: pulumi.String("string"),
IpVersion: pulumi.Float64(0),
EnableDhcp: pulumi.Bool(false),
GatewayIp: pulumi.String("string"),
HostRoutes: opentelekomcloud.NetworkingSubnetV2HostRouteArray{
&opentelekomcloud.NetworkingSubnetV2HostRouteArgs{
DestinationCidr: pulumi.String("string"),
NextHop: pulumi.String("string"),
},
},
AllocationPools: opentelekomcloud.NetworkingSubnetV2AllocationPoolArray{
&opentelekomcloud.NetworkingSubnetV2AllocationPoolArgs{
End: pulumi.String("string"),
Start: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
DnsNameservers: pulumi.StringArray{
pulumi.String("string"),
},
NetworkingSubnetV2Id: pulumi.String("string"),
NoGateway: pulumi.Bool(false),
Region: pulumi.String("string"),
TenantId: pulumi.String("string"),
Timeouts: &opentelekomcloud.NetworkingSubnetV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
ValueSpecs: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var networkingSubnetV2Resource = new NetworkingSubnetV2("networkingSubnetV2Resource", NetworkingSubnetV2Args.builder()
.networkId("string")
.cidr("string")
.ipVersion(0)
.enableDhcp(false)
.gatewayIp("string")
.hostRoutes(NetworkingSubnetV2HostRouteArgs.builder()
.destinationCidr("string")
.nextHop("string")
.build())
.allocationPools(NetworkingSubnetV2AllocationPoolArgs.builder()
.end("string")
.start("string")
.build())
.name("string")
.dnsNameservers("string")
.networkingSubnetV2Id("string")
.noGateway(false)
.region("string")
.tenantId("string")
.timeouts(NetworkingSubnetV2TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.valueSpecs(Map.of("string", "string"))
.build());
networking_subnet_v2_resource = opentelekomcloud.NetworkingSubnetV2("networkingSubnetV2Resource",
network_id="string",
cidr="string",
ip_version=0,
enable_dhcp=False,
gateway_ip="string",
host_routes=[{
"destination_cidr": "string",
"next_hop": "string",
}],
allocation_pools=[{
"end": "string",
"start": "string",
}],
name="string",
dns_nameservers=["string"],
networking_subnet_v2_id="string",
no_gateway=False,
region="string",
tenant_id="string",
timeouts={
"create": "string",
"delete": "string",
},
value_specs={
"string": "string",
})
const networkingSubnetV2Resource = new opentelekomcloud.NetworkingSubnetV2("networkingSubnetV2Resource", {
networkId: "string",
cidr: "string",
ipVersion: 0,
enableDhcp: false,
gatewayIp: "string",
hostRoutes: [{
destinationCidr: "string",
nextHop: "string",
}],
allocationPools: [{
end: "string",
start: "string",
}],
name: "string",
dnsNameservers: ["string"],
networkingSubnetV2Id: "string",
noGateway: false,
region: "string",
tenantId: "string",
timeouts: {
create: "string",
"delete": "string",
},
valueSpecs: {
string: "string",
},
});
type: opentelekomcloud:NetworkingSubnetV2
properties:
allocationPools:
- end: string
start: string
cidr: string
dnsNameservers:
- string
enableDhcp: false
gatewayIp: string
hostRoutes:
- destinationCidr: string
nextHop: string
ipVersion: 0
name: string
networkId: string
networkingSubnetV2Id: string
noGateway: false
region: string
tenantId: string
timeouts:
create: string
delete: string
valueSpecs:
string: string
NetworkingSubnetV2 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 NetworkingSubnetV2 resource accepts the following input properties:
- Cidr string
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- Network
Id string - The UUID of the parent network. Changing this creates a new subnet.
- Allocation
Pools List<NetworkingSubnet V2Allocation Pool> - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- Dns
Nameservers List<string> - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- Enable
Dhcp bool - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- Gateway
Ip string - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - Host
Routes List<NetworkingSubnet V2Host Route> - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- Ip
Version double - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Name string
- The name of the subnet. Changing this updates the name of the existing subnet.
- Networking
Subnet stringV2Id - No
Gateway bool - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- Region string
- Tenant
Id string - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- Timeouts
Networking
Subnet V2Timeouts - Value
Specs Dictionary<string, string> - Map of additional options.
- Cidr string
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- Network
Id string - The UUID of the parent network. Changing this creates a new subnet.
- Allocation
Pools []NetworkingSubnet V2Allocation Pool Args - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- Dns
Nameservers []string - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- Enable
Dhcp bool - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- Gateway
Ip string - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - Host
Routes []NetworkingSubnet V2Host Route Args - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- Ip
Version float64 - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Name string
- The name of the subnet. Changing this updates the name of the existing subnet.
- Networking
Subnet stringV2Id - No
Gateway bool - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- Region string
- Tenant
Id string - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- Timeouts
Networking
Subnet V2Timeouts Args - Value
Specs map[string]string - Map of additional options.
- cidr String
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- network
Id String - The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools List<NetworkingSubnet V2Allocation Pool> - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- dns
Nameservers List<String> - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable
Dhcp Boolean - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway
Ip String - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host
Routes List<NetworkingSubnet V2Host Route> - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip
Version Double - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name String
- The name of the subnet. Changing this updates the name of the existing subnet.
- networking
Subnet StringV2Id - no
Gateway Boolean - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region String
- tenant
Id String - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts
Networking
Subnet V2Timeouts - value
Specs Map<String,String> - Map of additional options.
- cidr string
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- network
Id string - The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools NetworkingSubnet V2Allocation Pool[] - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- dns
Nameservers string[] - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable
Dhcp boolean - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway
Ip string - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host
Routes NetworkingSubnet V2Host Route[] - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip
Version number - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name string
- The name of the subnet. Changing this updates the name of the existing subnet.
- networking
Subnet stringV2Id - no
Gateway boolean - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region string
- tenant
Id string - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts
Networking
Subnet V2Timeouts - value
Specs {[key: string]: string} - Map of additional options.
- cidr str
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- network_
id str - The UUID of the parent network. Changing this creates a new subnet.
- allocation_
pools Sequence[NetworkingSubnet V2Allocation Pool Args] - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- dns_
nameservers Sequence[str] - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable_
dhcp bool - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway_
ip str - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host_
routes Sequence[NetworkingSubnet V2Host Route Args] - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip_
version float - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name str
- The name of the subnet. Changing this updates the name of the existing subnet.
- networking_
subnet_ strv2_ id - no_
gateway bool - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region str
- tenant_
id str - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts
Networking
Subnet V2Timeouts Args - value_
specs Mapping[str, str] - Map of additional options.
- cidr String
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- network
Id String - The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools List<Property Map> - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- dns
Nameservers List<String> - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable
Dhcp Boolean - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway
Ip String - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host
Routes List<Property Map> - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip
Version Number - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name String
- The name of the subnet. Changing this updates the name of the existing subnet.
- networking
Subnet StringV2Id - no
Gateway Boolean - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region String
- tenant
Id String - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts Property Map
- value
Specs Map<String> - Map of additional options.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingSubnetV2 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 NetworkingSubnetV2 Resource
Get an existing NetworkingSubnetV2 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?: NetworkingSubnetV2State, opts?: CustomResourceOptions): NetworkingSubnetV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocation_pools: Optional[Sequence[NetworkingSubnetV2AllocationPoolArgs]] = None,
cidr: Optional[str] = None,
dns_nameservers: Optional[Sequence[str]] = None,
enable_dhcp: Optional[bool] = None,
gateway_ip: Optional[str] = None,
host_routes: Optional[Sequence[NetworkingSubnetV2HostRouteArgs]] = None,
ip_version: Optional[float] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
networking_subnet_v2_id: Optional[str] = None,
no_gateway: Optional[bool] = None,
region: Optional[str] = None,
tenant_id: Optional[str] = None,
timeouts: Optional[NetworkingSubnetV2TimeoutsArgs] = None,
value_specs: Optional[Mapping[str, str]] = None) -> NetworkingSubnetV2
func GetNetworkingSubnetV2(ctx *Context, name string, id IDInput, state *NetworkingSubnetV2State, opts ...ResourceOption) (*NetworkingSubnetV2, error)
public static NetworkingSubnetV2 Get(string name, Input<string> id, NetworkingSubnetV2State? state, CustomResourceOptions? opts = null)
public static NetworkingSubnetV2 get(String name, Output<String> id, NetworkingSubnetV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:NetworkingSubnetV2 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.
- Allocation
Pools List<NetworkingSubnet V2Allocation Pool> - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- Cidr string
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- Dns
Nameservers List<string> - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- Enable
Dhcp bool - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- Gateway
Ip string - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - Host
Routes List<NetworkingSubnet V2Host Route> - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- Ip
Version double - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Name string
- The name of the subnet. Changing this updates the name of the existing subnet.
- Network
Id string - The UUID of the parent network. Changing this creates a new subnet.
- Networking
Subnet stringV2Id - No
Gateway bool - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- Region string
- Tenant
Id string - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- Timeouts
Networking
Subnet V2Timeouts - Value
Specs Dictionary<string, string> - Map of additional options.
- Allocation
Pools []NetworkingSubnet V2Allocation Pool Args - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- Cidr string
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- Dns
Nameservers []string - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- Enable
Dhcp bool - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- Gateway
Ip string - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - Host
Routes []NetworkingSubnet V2Host Route Args - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- Ip
Version float64 - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Name string
- The name of the subnet. Changing this updates the name of the existing subnet.
- Network
Id string - The UUID of the parent network. Changing this creates a new subnet.
- Networking
Subnet stringV2Id - No
Gateway bool - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- Region string
- Tenant
Id string - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- Timeouts
Networking
Subnet V2Timeouts Args - Value
Specs map[string]string - Map of additional options.
- allocation
Pools List<NetworkingSubnet V2Allocation Pool> - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- cidr String
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- dns
Nameservers List<String> - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable
Dhcp Boolean - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway
Ip String - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host
Routes List<NetworkingSubnet V2Host Route> - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip
Version Double - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name String
- The name of the subnet. Changing this updates the name of the existing subnet.
- network
Id String - The UUID of the parent network. Changing this creates a new subnet.
- networking
Subnet StringV2Id - no
Gateway Boolean - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region String
- tenant
Id String - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts
Networking
Subnet V2Timeouts - value
Specs Map<String,String> - Map of additional options.
- allocation
Pools NetworkingSubnet V2Allocation Pool[] - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- cidr string
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- dns
Nameservers string[] - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable
Dhcp boolean - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway
Ip string - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host
Routes NetworkingSubnet V2Host Route[] - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip
Version number - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name string
- The name of the subnet. Changing this updates the name of the existing subnet.
- network
Id string - The UUID of the parent network. Changing this creates a new subnet.
- networking
Subnet stringV2Id - no
Gateway boolean - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region string
- tenant
Id string - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts
Networking
Subnet V2Timeouts - value
Specs {[key: string]: string} - Map of additional options.
- allocation_
pools Sequence[NetworkingSubnet V2Allocation Pool Args] - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- cidr str
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- dns_
nameservers Sequence[str] - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable_
dhcp bool - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway_
ip str - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host_
routes Sequence[NetworkingSubnet V2Host Route Args] - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip_
version float - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name str
- The name of the subnet. Changing this updates the name of the existing subnet.
- network_
id str - The UUID of the parent network. Changing this creates a new subnet.
- networking_
subnet_ strv2_ id - no_
gateway bool - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region str
- tenant_
id str - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts
Networking
Subnet V2Timeouts Args - value_
specs Mapping[str, str] - Map of additional options.
- allocation
Pools List<Property Map> - An array of sub-ranges of CIDR available for dynamic allocation to ports. The allocation_pool object structure is documented below. Changing this creates a new subnet.
- cidr String
- CIDR representing IP range for this subnet, based on IP version. Changing this creates a new subnet.
- dns
Nameservers List<String> - An array of DNS name server names used by hosts
in this subnet. Changing this updates the DNS name servers for the existing
subnet. Default value is
["100.125.4.25", "100.125.129.199"]
- enable
Dhcp Boolean - The administrative state of the network. Acceptable values are "true" and "false". Changing this value enables or disables the DHCP capabilities of the existing subnet. Defaults to true.
- gateway
Ip String - Default gateway used by devices in this subnet.
Leaving this blank and not setting
no_gateway
will cause a default gateway of.1
to be used. Changing this updates the gateway IP of the existing subnet. - host
Routes List<Property Map> - An array of routes that should be used by devices with IPs from this subnet (not including local subnet route). The host_route object structure is documented below. Changing this updates the host routes for the existing subnet.
- ip
Version Number - IP version, either 4 (default) or 6. Changing this creates a new subnet.
- name String
- The name of the subnet. Changing this updates the name of the existing subnet.
- network
Id String - The UUID of the parent network. Changing this creates a new subnet.
- networking
Subnet StringV2Id - no
Gateway Boolean - Do not set a gateway IP on this subnet. Changing this removes or adds a default gateway IP of the existing subnet.
- region String
- tenant
Id String - The owner of the subnet. Required if admin wants to create a subnet for another tenant. Changing this creates a new subnet.
- timeouts Property Map
- value
Specs Map<String> - Map of additional options.
Supporting Types
NetworkingSubnetV2AllocationPool, NetworkingSubnetV2AllocationPoolArgs
NetworkingSubnetV2HostRoute, NetworkingSubnetV2HostRouteArgs
- Destination
Cidr string - The destination CIDR.
- Next
Hop string - The next hop in the route.
- Destination
Cidr string - The destination CIDR.
- Next
Hop string - The next hop in the route.
- destination
Cidr String - The destination CIDR.
- next
Hop String - The next hop in the route.
- destination
Cidr string - The destination CIDR.
- next
Hop string - The next hop in the route.
- destination_
cidr str - The destination CIDR.
- next_
hop str - The next hop in the route.
- destination
Cidr String - The destination CIDR.
- next
Hop String - The next hop in the route.
NetworkingSubnetV2Timeouts, NetworkingSubnetV2TimeoutsArgs
Import
Subnets can be imported using the id
, e.g.
$ pulumi import opentelekomcloud:index/networkingSubnetV2:NetworkingSubnetV2 subnet_1 da4faf16-5546-41e4-8330-4d0002b74048
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.