edgecenter.Subnet
Explore with Pulumi AI
Represent subnets. Subnetwork is a range of IP addresses in a cloud network. Addresses from this range will be assigned to machines in the cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const network = new edgecenter.Network("network", {
type: "vxlan",
regionId: 1,
projectId: 1,
});
const subnet = new edgecenter.Subnet("subnet", {
cidr: "192.168.10.0/24",
networkId: network.networkId,
dnsNameservers: [
"8.8.4.4",
"1.1.1.1",
],
enableDhcp: true,
hostRoutes: [
{
destination: "10.0.3.0/24",
nexthop: "10.0.0.13",
},
{
destination: "10.0.4.0/24",
nexthop: "10.0.0.14",
},
],
allocationPools: [{
start: "192.168.10.20",
end: "192.168.10.50",
}],
gatewayIp: "192.168.10.1",
regionId: 1,
projectId: 1,
});
import pulumi
import pulumi_edgecenter as edgecenter
network = edgecenter.Network("network",
type="vxlan",
region_id=1,
project_id=1)
subnet = edgecenter.Subnet("subnet",
cidr="192.168.10.0/24",
network_id=network.network_id,
dns_nameservers=[
"8.8.4.4",
"1.1.1.1",
],
enable_dhcp=True,
host_routes=[
{
"destination": "10.0.3.0/24",
"nexthop": "10.0.0.13",
},
{
"destination": "10.0.4.0/24",
"nexthop": "10.0.0.14",
},
],
allocation_pools=[{
"start": "192.168.10.20",
"end": "192.168.10.50",
}],
gateway_ip="192.168.10.1",
region_id=1,
project_id=1)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
network, err := edgecenter.NewNetwork(ctx, "network", &edgecenter.NetworkArgs{
Type: pulumi.String("vxlan"),
RegionId: pulumi.Float64(1),
ProjectId: pulumi.Float64(1),
})
if err != nil {
return err
}
_, err = edgecenter.NewSubnet(ctx, "subnet", &edgecenter.SubnetArgs{
Cidr: pulumi.String("192.168.10.0/24"),
NetworkId: network.NetworkId,
DnsNameservers: pulumi.StringArray{
pulumi.String("8.8.4.4"),
pulumi.String("1.1.1.1"),
},
EnableDhcp: pulumi.Bool(true),
HostRoutes: edgecenter.SubnetHostRouteArray{
&edgecenter.SubnetHostRouteArgs{
Destination: pulumi.String("10.0.3.0/24"),
Nexthop: pulumi.String("10.0.0.13"),
},
&edgecenter.SubnetHostRouteArgs{
Destination: pulumi.String("10.0.4.0/24"),
Nexthop: pulumi.String("10.0.0.14"),
},
},
AllocationPools: edgecenter.SubnetAllocationPoolArray{
&edgecenter.SubnetAllocationPoolArgs{
Start: pulumi.String("192.168.10.20"),
End: pulumi.String("192.168.10.50"),
},
},
GatewayIp: pulumi.String("192.168.10.1"),
RegionId: pulumi.Float64(1),
ProjectId: pulumi.Float64(1),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() =>
{
var network = new Edgecenter.Network("network", new()
{
Type = "vxlan",
RegionId = 1,
ProjectId = 1,
});
var subnet = new Edgecenter.Subnet("subnet", new()
{
Cidr = "192.168.10.0/24",
NetworkId = network.NetworkId,
DnsNameservers = new[]
{
"8.8.4.4",
"1.1.1.1",
},
EnableDhcp = true,
HostRoutes = new[]
{
new Edgecenter.Inputs.SubnetHostRouteArgs
{
Destination = "10.0.3.0/24",
Nexthop = "10.0.0.13",
},
new Edgecenter.Inputs.SubnetHostRouteArgs
{
Destination = "10.0.4.0/24",
Nexthop = "10.0.0.14",
},
},
AllocationPools = new[]
{
new Edgecenter.Inputs.SubnetAllocationPoolArgs
{
Start = "192.168.10.20",
End = "192.168.10.50",
},
},
GatewayIp = "192.168.10.1",
RegionId = 1,
ProjectId = 1,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.Network;
import com.pulumi.edgecenter.NetworkArgs;
import com.pulumi.edgecenter.Subnet;
import com.pulumi.edgecenter.SubnetArgs;
import com.pulumi.edgecenter.inputs.SubnetHostRouteArgs;
import com.pulumi.edgecenter.inputs.SubnetAllocationPoolArgs;
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 network = new Network("network", NetworkArgs.builder()
.type("vxlan")
.regionId(1)
.projectId(1)
.build());
var subnet = new Subnet("subnet", SubnetArgs.builder()
.cidr("192.168.10.0/24")
.networkId(network.networkId())
.dnsNameservers(
"8.8.4.4",
"1.1.1.1")
.enableDhcp(true)
.hostRoutes(
SubnetHostRouteArgs.builder()
.destination("10.0.3.0/24")
.nexthop("10.0.0.13")
.build(),
SubnetHostRouteArgs.builder()
.destination("10.0.4.0/24")
.nexthop("10.0.0.14")
.build())
.allocationPools(SubnetAllocationPoolArgs.builder()
.start("192.168.10.20")
.end("192.168.10.50")
.build())
.gatewayIp("192.168.10.1")
.regionId(1)
.projectId(1)
.build());
}
}
resources:
network:
type: edgecenter:Network
properties:
type: vxlan
regionId: 1
projectId: 1
subnet:
type: edgecenter:Subnet
properties:
cidr: 192.168.10.0/24
networkId: ${network.networkId}
dnsNameservers:
- 8.8.4.4
- 1.1.1.1
enableDhcp: true
hostRoutes:
- destination: 10.0.3.0/24
nexthop: 10.0.0.13
- destination: 10.0.4.0/24
nexthop: 10.0.0.14
allocationPools:
- start: 192.168.10.20
end: 192.168.10.50
gatewayIp: 192.168.10.1
regionId: 1
projectId: 1
Create Subnet Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);
@overload
def Subnet(resource_name: str,
args: SubnetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Subnet(resource_name: str,
opts: Optional[ResourceOptions] = None,
network_id: Optional[str] = None,
cidr: Optional[str] = None,
dns_nameservers: Optional[Sequence[str]] = None,
allocation_pools: Optional[Sequence[SubnetAllocationPoolArgs]] = None,
enable_dhcp: Optional[bool] = None,
gateway_ip: Optional[str] = None,
host_routes: Optional[Sequence[SubnetHostRouteArgs]] = None,
metadata_map: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
connect_to_network_router: Optional[bool] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
subnet_id: Optional[str] = None)
func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)
public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)
public Subnet(String name, SubnetArgs args)
public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
type: edgecenter:Subnet
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 SubnetArgs
- 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 SubnetArgs
- 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 SubnetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubnetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubnetArgs
- 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 subnetResource = new Edgecenter.Subnet("subnetResource", new()
{
NetworkId = "string",
Cidr = "string",
DnsNameservers = new[]
{
"string",
},
AllocationPools = new[]
{
new Edgecenter.Inputs.SubnetAllocationPoolArgs
{
End = "string",
Start = "string",
},
},
EnableDhcp = false,
GatewayIp = "string",
HostRoutes = new[]
{
new Edgecenter.Inputs.SubnetHostRouteArgs
{
Destination = "string",
Nexthop = "string",
},
},
MetadataMap =
{
{ "string", "string" },
},
Name = "string",
ConnectToNetworkRouter = false,
ProjectId = 0,
ProjectName = "string",
RegionId = 0,
RegionName = "string",
SubnetId = "string",
});
example, err := edgecenter.NewSubnet(ctx, "subnetResource", &edgecenter.SubnetArgs{
NetworkId: pulumi.String("string"),
Cidr: pulumi.String("string"),
DnsNameservers: pulumi.StringArray{
pulumi.String("string"),
},
AllocationPools: edgecenter.SubnetAllocationPoolArray{
&edgecenter.SubnetAllocationPoolArgs{
End: pulumi.String("string"),
Start: pulumi.String("string"),
},
},
EnableDhcp: pulumi.Bool(false),
GatewayIp: pulumi.String("string"),
HostRoutes: edgecenter.SubnetHostRouteArray{
&edgecenter.SubnetHostRouteArgs{
Destination: pulumi.String("string"),
Nexthop: pulumi.String("string"),
},
},
MetadataMap: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
ConnectToNetworkRouter: pulumi.Bool(false),
ProjectId: pulumi.Float64(0),
ProjectName: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
SubnetId: pulumi.String("string"),
})
var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
.networkId("string")
.cidr("string")
.dnsNameservers("string")
.allocationPools(SubnetAllocationPoolArgs.builder()
.end("string")
.start("string")
.build())
.enableDhcp(false)
.gatewayIp("string")
.hostRoutes(SubnetHostRouteArgs.builder()
.destination("string")
.nexthop("string")
.build())
.metadataMap(Map.of("string", "string"))
.name("string")
.connectToNetworkRouter(false)
.projectId(0)
.projectName("string")
.regionId(0)
.regionName("string")
.subnetId("string")
.build());
subnet_resource = edgecenter.Subnet("subnetResource",
network_id="string",
cidr="string",
dns_nameservers=["string"],
allocation_pools=[{
"end": "string",
"start": "string",
}],
enable_dhcp=False,
gateway_ip="string",
host_routes=[{
"destination": "string",
"nexthop": "string",
}],
metadata_map={
"string": "string",
},
name="string",
connect_to_network_router=False,
project_id=0,
project_name="string",
region_id=0,
region_name="string",
subnet_id="string")
const subnetResource = new edgecenter.Subnet("subnetResource", {
networkId: "string",
cidr: "string",
dnsNameservers: ["string"],
allocationPools: [{
end: "string",
start: "string",
}],
enableDhcp: false,
gatewayIp: "string",
hostRoutes: [{
destination: "string",
nexthop: "string",
}],
metadataMap: {
string: "string",
},
name: "string",
connectToNetworkRouter: false,
projectId: 0,
projectName: "string",
regionId: 0,
regionName: "string",
subnetId: "string",
});
type: edgecenter:Subnet
properties:
allocationPools:
- end: string
start: string
cidr: string
connectToNetworkRouter: false
dnsNameservers:
- string
enableDhcp: false
gatewayIp: string
hostRoutes:
- destination: string
nexthop: string
metadataMap:
string: string
name: string
networkId: string
projectId: 0
projectName: string
regionId: 0
regionName: string
subnetId: string
Subnet 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 Subnet resource accepts the following input properties:
- Cidr string
- Represents the IP address range of the subnet.
- Network
Id string - The ID of the network to which this subnet belongs.
- Allocation
Pools List<SubnetAllocation Pool> - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- Connect
To boolNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- Dns
Nameservers List<string> - List of DNS name servers for the subnet.
- Enable
Dhcp bool - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- Gateway
Ip string - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- Host
Routes List<SubnetHost Route> - List of additional routes to be added to instances that are part of this subnet.
- Metadata
Map Dictionary<string, string> - A map containing metadata, for example tags.
- Name string
- The name of the subnet.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Subnet
Id string - The ID of this resource.
- Cidr string
- Represents the IP address range of the subnet.
- Network
Id string - The ID of the network to which this subnet belongs.
- Allocation
Pools []SubnetAllocation Pool Args - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- Connect
To boolNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- Dns
Nameservers []string - List of DNS name servers for the subnet.
- Enable
Dhcp bool - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- Gateway
Ip string - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- Host
Routes []SubnetHost Route Args - List of additional routes to be added to instances that are part of this subnet.
- Metadata
Map map[string]string - A map containing metadata, for example tags.
- Name string
- The name of the subnet.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Subnet
Id string - The ID of this resource.
- cidr String
- Represents the IP address range of the subnet.
- network
Id String - The ID of the network to which this subnet belongs.
- allocation
Pools List<SubnetAllocation Pool> - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- connect
To BooleanNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns
Nameservers List<String> - List of DNS name servers for the subnet.
- enable
Dhcp Boolean - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway
Ip String - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host
Routes List<SubnetHost Route> - List of additional routes to be added to instances that are part of this subnet.
- metadata
Map Map<String,String> - A map containing metadata, for example tags.
- name String
- The name of the subnet.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet
Id String - The ID of this resource.
- cidr string
- Represents the IP address range of the subnet.
- network
Id string - The ID of the network to which this subnet belongs.
- allocation
Pools SubnetAllocation Pool[] - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- connect
To booleanNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns
Nameservers string[] - List of DNS name servers for the subnet.
- enable
Dhcp boolean - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway
Ip string - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host
Routes SubnetHost Route[] - List of additional routes to be added to instances that are part of this subnet.
- metadata
Map {[key: string]: string} - A map containing metadata, for example tags.
- name string
- The name of the subnet.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet
Id string - The ID of this resource.
- cidr str
- Represents the IP address range of the subnet.
- network_
id str - The ID of the network to which this subnet belongs.
- allocation_
pools Sequence[SubnetAllocation Pool Args] - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- connect_
to_ boolnetwork_ router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns_
nameservers Sequence[str] - List of DNS name servers for the subnet.
- enable_
dhcp bool - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway_
ip str - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host_
routes Sequence[SubnetHost Route Args] - List of additional routes to be added to instances that are part of this subnet.
- metadata_
map Mapping[str, str] - A map containing metadata, for example tags.
- name str
- The name of the subnet.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet_
id str - The ID of this resource.
- cidr String
- Represents the IP address range of the subnet.
- network
Id String - The ID of the network to which this subnet belongs.
- allocation
Pools List<Property Map> - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- connect
To BooleanNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns
Nameservers List<String> - List of DNS name servers for the subnet.
- enable
Dhcp Boolean - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway
Ip String - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host
Routes List<Property Map> - List of additional routes to be added to instances that are part of this subnet.
- metadata
Map Map<String> - A map containing metadata, for example tags.
- name String
- The name of the subnet.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet
Id String - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Read List<SubnetOnlies Metadata Read Only> - A list of read-only metadata items, e.g. tags.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Read []SubnetOnlies Metadata Read Only - A list of read-only metadata items, e.g. tags.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Read List<SubnetOnlies Metadata Read Only> - A list of read-only metadata items, e.g. tags.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string - The timestamp of the last update (use with update context).
- metadata
Read SubnetOnlies Metadata Read Only[] - A list of read-only metadata items, e.g. tags.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str - The timestamp of the last update (use with update context).
- metadata_
read_ Sequence[Subnetonlies Metadata Read Only] - A list of read-only metadata items, e.g. tags.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Read List<Property Map>Onlies - A list of read-only metadata items, e.g. tags.
Look up Existing Subnet Resource
Get an existing Subnet 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?: SubnetState, opts?: CustomResourceOptions): Subnet
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocation_pools: Optional[Sequence[SubnetAllocationPoolArgs]] = None,
cidr: Optional[str] = None,
connect_to_network_router: Optional[bool] = None,
dns_nameservers: Optional[Sequence[str]] = None,
enable_dhcp: Optional[bool] = None,
gateway_ip: Optional[str] = None,
host_routes: Optional[Sequence[SubnetHostRouteArgs]] = None,
last_updated: Optional[str] = None,
metadata_map: Optional[Mapping[str, str]] = None,
metadata_read_onlies: Optional[Sequence[SubnetMetadataReadOnlyArgs]] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
subnet_id: Optional[str] = None) -> Subnet
func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
public static Subnet get(String name, Output<String> id, SubnetState state, CustomResourceOptions options)
resources: _: type: edgecenter:Subnet 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<SubnetAllocation Pool> - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- Cidr string
- Represents the IP address range of the subnet.
- Connect
To boolNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- Dns
Nameservers List<string> - List of DNS name servers for the subnet.
- Enable
Dhcp bool - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- Gateway
Ip string - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- Host
Routes List<SubnetHost Route> - List of additional routes to be added to instances that are part of this subnet.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Map Dictionary<string, string> - A map containing metadata, for example tags.
- Metadata
Read List<SubnetOnlies Metadata Read Only> - A list of read-only metadata items, e.g. tags.
- Name string
- The name of the subnet.
- Network
Id string - The ID of the network to which this subnet belongs.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Subnet
Id string - The ID of this resource.
- Allocation
Pools []SubnetAllocation Pool Args - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- Cidr string
- Represents the IP address range of the subnet.
- Connect
To boolNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- Dns
Nameservers []string - List of DNS name servers for the subnet.
- Enable
Dhcp bool - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- Gateway
Ip string - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- Host
Routes []SubnetHost Route Args - List of additional routes to be added to instances that are part of this subnet.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata
Map map[string]string - A map containing metadata, for example tags.
- Metadata
Read []SubnetOnlies Metadata Read Only Args - A list of read-only metadata items, e.g. tags.
- Name string
- The name of the subnet.
- Network
Id string - The ID of the network to which this subnet belongs.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Subnet
Id string - The ID of this resource.
- allocation
Pools List<SubnetAllocation Pool> - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- cidr String
- Represents the IP address range of the subnet.
- connect
To BooleanNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns
Nameservers List<String> - List of DNS name servers for the subnet.
- enable
Dhcp Boolean - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway
Ip String - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host
Routes List<SubnetHost Route> - List of additional routes to be added to instances that are part of this subnet.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Map Map<String,String> - A map containing metadata, for example tags.
- metadata
Read List<SubnetOnlies Metadata Read Only> - A list of read-only metadata items, e.g. tags.
- name String
- The name of the subnet.
- network
Id String - The ID of the network to which this subnet belongs.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet
Id String - The ID of this resource.
- allocation
Pools SubnetAllocation Pool[] - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- cidr string
- Represents the IP address range of the subnet.
- connect
To booleanNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns
Nameservers string[] - List of DNS name servers for the subnet.
- enable
Dhcp boolean - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway
Ip string - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host
Routes SubnetHost Route[] - List of additional routes to be added to instances that are part of this subnet.
- last
Updated string - The timestamp of the last update (use with update context).
- metadata
Map {[key: string]: string} - A map containing metadata, for example tags.
- metadata
Read SubnetOnlies Metadata Read Only[] - A list of read-only metadata items, e.g. tags.
- name string
- The name of the subnet.
- network
Id string - The ID of the network to which this subnet belongs.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet
Id string - The ID of this resource.
- allocation_
pools Sequence[SubnetAllocation Pool Args] - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- cidr str
- Represents the IP address range of the subnet.
- connect_
to_ boolnetwork_ router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns_
nameservers Sequence[str] - List of DNS name servers for the subnet.
- enable_
dhcp bool - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway_
ip str - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host_
routes Sequence[SubnetHost Route Args] - List of additional routes to be added to instances that are part of this subnet.
- last_
updated str - The timestamp of the last update (use with update context).
- metadata_
map Mapping[str, str] - A map containing metadata, for example tags.
- metadata_
read_ Sequence[Subnetonlies Metadata Read Only Args] - A list of read-only metadata items, e.g. tags.
- name str
- The name of the subnet.
- network_
id str - The ID of the network to which this subnet belongs.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet_
id str - The ID of this resource.
- allocation
Pools List<Property Map> - A list of allocation pools for DHCP. If omitted but DHCP or gateway settings are changed on update, pools are automatically reassigned.
- cidr String
- Represents the IP address range of the subnet.
- connect
To BooleanNetwork Router - True if the network's router should get a gateway in this subnet. Must be explicitly 'false' when gateway_ip is null. Default true.
- dns
Nameservers List<String> - List of DNS name servers for the subnet.
- enable
Dhcp Boolean - Enable DHCP for this subnet. If true, DHCP will be used to assign IP addresses to instances within this subnet.
- gateway
Ip String - The IP address of the gateway for this subnet. The subnet will be recreated if the gateway IP is changed.
- host
Routes List<Property Map> - List of additional routes to be added to instances that are part of this subnet.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata
Map Map<String> - A map containing metadata, for example tags.
- metadata
Read List<Property Map>Onlies - A list of read-only metadata items, e.g. tags.
- name String
- The name of the subnet.
- network
Id String - The ID of the network to which this subnet belongs.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- subnet
Id String - The ID of this resource.
Supporting Types
SubnetAllocationPool, SubnetAllocationPoolArgs
SubnetHostRoute, SubnetHostRouteArgs
- Destination string
- The CIDR of the destination IPv4 subnet
- Nexthop string
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- Destination string
- The CIDR of the destination IPv4 subnet
- Nexthop string
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination String
- The CIDR of the destination IPv4 subnet
- nexthop String
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination string
- The CIDR of the destination IPv4 subnet
- nexthop string
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination str
- The CIDR of the destination IPv4 subnet
- nexthop str
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
- destination String
- The CIDR of the destination IPv4 subnet
- nexthop String
- IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR
SubnetMetadataReadOnly, SubnetMetadataReadOnlyArgs
Import
import using <project_id>:<region_id>:<subnet_id> format
$ pulumi import edgecenter:index/subnet:Subnet subnet1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the
edgecenter
Terraform Provider.