Subnet
Manages a V2 Neutron subnet resource within OpenStack.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var network1 = new OpenStack.Networking.Network("network1", new OpenStack.Networking.NetworkArgs
{
AdminStateUp = true,
});
var subnet1 = new OpenStack.Networking.Subnet("subnet1", new OpenStack.Networking.SubnetArgs
{
Cidr = "192.168.199.0/24",
NetworkId = network1.Id,
});
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
network1 = openstack.networking.Network("network1", admin_state_up="true")
subnet1 = openstack.networking.Subnet("subnet1",
cidr="192.168.199.0/24",
network_id=network1.id)import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const network1 = new openstack.networking.Network("network_1", {
adminStateUp: true,
});
const subnet1 = new openstack.networking.Subnet("subnet_1", {
cidr: "192.168.199.0/24",
networkId: network1.id,
});Create a Subnet Resource
new Subnet(name: string, args: SubnetArgs, opts?: CustomResourceOptions);def Subnet(resource_name, opts=None, allocation_pools=None, allocation_pools_collection=None, cidr=None, description=None, dns_nameservers=None, enable_dhcp=None, gateway_ip=None, host_routes=None, ip_version=None, ipv6_address_mode=None, ipv6_ra_mode=None, name=None, network_id=None, no_gateway=None, prefix_length=None, region=None, subnetpool_id=None, tags=None, tenant_id=None, value_specs=None, __props__=None);func NewSubnet(ctx *Context, name string, args SubnetArgs, opts ...ResourceOption) (*Subnet, error)public Subnet(string name, SubnetArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Subnet Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Subnet resource accepts the following input properties:
- Network
Id string The UUID of the parent network. Changing this creates a new subnet.
- Allocation
Pools List<Pulumi.Open Stack. Networking. Inputs. Subnet Allocation Pool Args> A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- Allocation
Pools List<Pulumi.Collection Open Stack. Networking. Inputs. Subnet Allocation Pools Collection Args> A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- Cidr string
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- Description string
Human-readable description of the subnet. Changing this updates the name of the existing 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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- Host
Routes List<Pulumi.Open Stack. Networking. Inputs. Subnet Host Route Args> (Deprecated - use
openstack.networking.SubnetRouteinstead) 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 int IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Ipv6Address
Mode string The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- Ipv6Ra
Mode string The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- Name string
The name of the subnet. Changing this updates the name of the existing subnet.
- 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.
- Prefix
Length int The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- Subnetpool
Id string The ID of the subnetpool associated with the subnet.
- List<string>
A set of string tags for the subnet.
- 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.
- Value
Specs Dictionary<string, object> Map of additional options.
- Network
Id string The UUID of the parent network. Changing this creates a new subnet.
- Allocation
Pools []SubnetAllocation Pool A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- Allocation
Pools []SubnetCollection Allocation Pools Collection A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- Cidr string
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- Description string
Human-readable description of the subnet. Changing this updates the name of the existing 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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- Host
Routes []SubnetHost Route (Deprecated - use
openstack.networking.SubnetRouteinstead) 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 int IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Ipv6Address
Mode string The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- Ipv6Ra
Mode string The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- Name string
The name of the subnet. Changing this updates the name of the existing subnet.
- 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.
- Prefix
Length int The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- Subnetpool
Id string The ID of the subnetpool associated with the subnet.
- []string
A set of string tags for the subnet.
- 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.
- Value
Specs map[string]interface{} Map of additional options.
- network
Id string The UUID of the parent network. Changing this creates a new subnet.
- allocation
Pools SubnetAllocation Pool[] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- allocation
Pools SubnetCollection Allocation Pools Collection[] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- cidr string
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- description string
Human-readable description of the subnet. Changing this updates the name of the existing 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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- host
Routes SubnetHost Route[] (Deprecated - use
openstack.networking.SubnetRouteinstead) 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.
- ipv6Address
Mode string The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- ipv6Ra
Mode string The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- name string
The name of the subnet. Changing this updates the name of the existing subnet.
- 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.
- prefix
Length number The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- subnetpool
Id string The ID of the subnetpool associated with the subnet.
- string[]
A set of string tags for the subnet.
- 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.
- value
Specs {[key: string]: any} Map of additional options.
- network_
id str The UUID of the parent network. Changing this creates a new subnet.
- allocation_
pools List[SubnetAllocation Pool] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- allocation_
pools_ List[Subnetcollection Allocation Pools Collection] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- cidr str
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- description str
Human-readable description of the subnet. Changing this updates the name of the existing subnet.
- dns_
nameservers List[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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- host_
routes List[SubnetHost Route] (Deprecated - use
openstack.networking.SubnetRouteinstead) 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.
- ipv6_
address_ strmode The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- ipv6_
ra_ strmode The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- name str
The name of the subnet. Changing this updates the name of the existing subnet.
- 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.
- prefix_
length float The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- region str
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- subnetpool_
id str The ID of the subnetpool associated with the subnet.
- List[str]
A set of string tags for the subnet.
- 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.
- value_
specs Dict[str, Any] Map of additional options.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subnet resource produces the following output properties:
- List<string>
The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- Id string
- The provider-assigned unique ID for this managed resource.
Look up an 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): Subnetstatic get(resource_name, id, opts=None, all_tags=None, allocation_pools=None, allocation_pools_collection=None, cidr=None, description=None, dns_nameservers=None, enable_dhcp=None, gateway_ip=None, host_routes=None, ip_version=None, ipv6_address_mode=None, ipv6_ra_mode=None, name=None, network_id=None, no_gateway=None, prefix_length=None, region=None, subnetpool_id=None, tags=None, tenant_id=None, value_specs=None, __props__=None);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)- 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.
The following state arguments are supported:
- List<string>
The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- Allocation
Pools List<Pulumi.Open Stack. Networking. Inputs. Subnet Allocation Pool Args> A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- Allocation
Pools List<Pulumi.Collection Open Stack. Networking. Inputs. Subnet Allocation Pools Collection Args> A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- Cidr string
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- Description string
Human-readable description of the subnet. Changing this updates the name of the existing 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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- Host
Routes List<Pulumi.Open Stack. Networking. Inputs. Subnet Host Route Args> (Deprecated - use
openstack.networking.SubnetRouteinstead) 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 int IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Ipv6Address
Mode string The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- Ipv6Ra
Mode string The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- 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.
- 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.
- Prefix
Length int The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- Subnetpool
Id string The ID of the subnetpool associated with the subnet.
- List<string>
A set of string tags for the subnet.
- 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.
- Value
Specs Dictionary<string, object> Map of additional options.
- []string
The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- Allocation
Pools []SubnetAllocation Pool A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- Allocation
Pools []SubnetCollection Allocation Pools Collection A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- Cidr string
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- Description string
Human-readable description of the subnet. Changing this updates the name of the existing 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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- Host
Routes []SubnetHost Route (Deprecated - use
openstack.networking.SubnetRouteinstead) 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 int IP version, either 4 (default) or 6. Changing this creates a new subnet.
- Ipv6Address
Mode string The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- Ipv6Ra
Mode string The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- 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.
- 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.
- Prefix
Length int The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- Region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- Subnetpool
Id string The ID of the subnetpool associated with the subnet.
- []string
A set of string tags for the subnet.
- 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.
- Value
Specs map[string]interface{} Map of additional options.
- string[]
The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- allocation
Pools SubnetAllocation Pool[] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- allocation
Pools SubnetCollection Allocation Pools Collection[] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- cidr string
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- description string
Human-readable description of the subnet. Changing this updates the name of the existing 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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- host
Routes SubnetHost Route[] (Deprecated - use
openstack.networking.SubnetRouteinstead) 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.
- ipv6Address
Mode string The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- ipv6Ra
Mode string The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- 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.
- 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.
- prefix
Length number The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- region string
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- subnetpool
Id string The ID of the subnetpool associated with the subnet.
- string[]
A set of string tags for the subnet.
- 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.
- value
Specs {[key: string]: any} Map of additional options.
- List[str]
The collection of ags assigned on the subnet, which have been explicitly and implicitly added.
- allocation_
pools List[SubnetAllocation Pool] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. Multiple
allocation_poolblocks can be declared, providing the subnet with more than one range of IP addresses to use with DHCP. However, each IP range must be from the same CIDR that the subnet is part of. Theallocation_poolblock is documented below.- allocation_
pools_ List[Subnetcollection Allocation Pools Collection] A block declaring the start and end range of the IP addresses available for use with DHCP in this subnet. The
allocation_poolsblock is documented below.- cidr str
CIDR representing IP range for this subnet, based on IP version. You can omit this option if you are creating a subnet from a subnet pool.
- description str
Human-readable description of the subnet. Changing this updates the name of the existing subnet.
- dns_
nameservers List[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.
- 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_gatewaywill cause a default gateway of.1to be used. Changing this updates the gateway IP of the existing subnet.- host_
routes List[SubnetHost Route] (Deprecated - use
openstack.networking.SubnetRouteinstead) 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.
- ipv6_
address_ strmode The IPv6 address mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- ipv6_
ra_ strmode The IPv6 Router Advertisement mode. Valid values are
dhcpv6-stateful,dhcpv6-stateless, orslaac.- 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.
- 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.
- prefix_
length float The prefix length to use when creating a subnet from a subnet pool. The default subnet pool prefix length that was defined when creating the subnet pool will be used if not provided. Changing this creates a new subnet.
- region str
The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron subnet. If omitted, the
regionargument of the provider is used. Changing this creates a new subnet.- subnetpool_
id str The ID of the subnetpool associated with the subnet.
- List[str]
A set of string tags for the subnet.
- 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.
- value_
specs Dict[str, Any] Map of additional options.
Supporting Types
SubnetAllocationPool
SubnetAllocationPoolsCollection
SubnetHostRoute
- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.