• Resource Template Service

rts
  1. Help Center
  2. Resource Template Service
  3. User Guide
  4. Resource Template Types
  5. OS::Neutron::Subnet

OS::Neutron::Subnet

The resource is not allowed to be updated.

A resource for managing Neutron subnets.

A subnet represents an IP address block that can be used for assigning IP addresses to virtual instances. Each subnet must have a CIDR and must be associated with a network. IP addresses can be either selected from the whole subnet CIDR, or from "allocation pools" that can be specified by the user.

NOTE:

A network can only have one subnet.

Required Properties

Name

Description

cidr

The CIDR.

String value expected.

Updates cause replacement.

Optional Properties

Name

Description

allocation_pools

The start and end addresses for the allocation pools.

List value expected.

Can be updated without replacement.

List contents:

  • *

    Map value expected.

    Can be updated without replacement.

    Map properties:

    • end

      End address for the allocation pool.

      String value expected.

      Can be updated without replacement.

      Value must be of type ip_addr

    • start

      Start address for the allocation pool.

      String value expected.

      Can be updated without replacement.

      Value must be of type ip_addr

dns_nameservers

A specified set of DNS name servers to be used.

List value expected.

Can be updated without replacement.

Defaults to "[]".

enable_dhcp

Set to true if DHCP is enabled and false if DHCP is disabled.

Boolean value expected.

Can be updated without replacement.

Defaults to "True".

gateway_ip

The gateway IP address. Set to any of [ null | ~ | "" ] to create/update a subnet without a gateway. If omitted when creation, neutron will assign the first free IP address within the subnet to the gateway automatically. If remove this from template when update, the old gateway IP address will be detached.

String value expected.

Can be updated without replacement.

host_routes

A list of host route dictionaries for the subnet.

List value expected.

Can be updated without replacement.

List contents:

  • *

    Map value expected.

    Can be updated without replacement.

    Map properties:

    • destination

      The destination for static route.

      String value expected.

      Can be updated without replacement.

      Value must be of type net_cidr

    • nexthop

      The next hop for the destination.

      String value expected.

      Can be updated without replacement.

      Value must be of type ip_addr

ip_version

The IP version, which is 4 or 6.

Integer value expected.

Updates cause replacement.

Defaults to "4".

Allowed values: 4, 6

NOTE:

Do not update this attribute. Otherwise, the network update will fail.

name

The name of the subnet.

String value expected.

Can be updated without replacement.

network

The name of the attached network.

String value expected.

Updates cause replacement.

network_id

The ID of the attached network.

String value expected.

Updates cause replacement.

NOTE:

In the template, network and network_id cannot appear at the same time, otherwise the stack will fail to create.

tenant_id

The ID of the tenant who owns the network. Only administrative users can specify a tenant ID other than their own.

String value expected.

Updates cause replacement.

NOTE:

Do not update this attribute. Otherwise, the network update will fail.

value_specs

Extra parameters to include in the request.

Map value expected.

Can be updated without replacement.

Defaults to "{}".

Attributes

Name

Description

allocation_pools

Ip allocation pools and their ranges.

cidr

CIDR block notation for this subnet.

dns_nameservers

List of dns nameservers.

enable_dhcp

true if DHCP is enabled for this subnet; false otherwise.

gateway_ip

Ip of the subnets gateway.

host_routes

Additional routes for this subnet.

ip_version

Ip version for the subnet.

name

Friendly name of the subnet.

network_id

Parent network of the subnet.

show

Detailed information about resource.

tenant_id

Tenant owning the subnet.

HOT Syntax

heat_template_version: 2014-10-16
...
resources:
  ...
  the_resource:
    type: OS::Neutron::Subnet
    properties:
      allocation_pools: [{"start": String, "end": String}, {"start": String, "end": String}, ...]
      cidr: String
      dns_nameservers: [Value, Value, ...]
      enable_dhcp: Boolean
      gateway_ip: String
      host_routes: [{"destination": String, "nexthop": String}, {"destination": String, "nexthop": String}, ...]
      ip_version: Integer
      name: String
      network: String
      network_id: String
      tenant_id: String
      value_specs: {...}