New in version 2.9.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| api_token  string / required  | This is the API Token for the Hetzner Cloud. | |
| endpoint  string  | Default: "https://api.hetzner.cloud/v1" | This is the API Endpoint for the Hetzner Cloud. | 
| ip_range  string / required  | IP range of the subnetwork. | |
| network  string / required  | The ID or Name of the Hetzner Cloud Networks. | |
| network_zone  string / required  | Name of network zone. | |
| state  string  | 
 | State of the subnetwork. | 
| type  string / required  | Type of subnetwork. | 
See also
- name: Create a basic subnetwork
  hcloud_subnetwork:
    network: my-network
    ip_range: 10.0.0.0/16
    network_zone: eu-central
    type: server
    state: present
- name: Ensure the subnetwork is absent (remove if needed)
  hcloud_subnetwork:
    network: my-network
    ip_range: 10.0.0.0/8
    network_zone: eu-central
    type: server
    state: absent
   Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | |
|---|---|---|---|
| hcloud_subnetwork  complex  | always | One Subnet of a Network | |
| gateway  string  | always | Gateway of the subnetwork Sample: 10.0.0.1 | |
| ip_range  string  | always | IP range of the Network Sample: 10.0.0.0/8 | |
| network  string  | always | Name of the Network Sample: my-network | |
| network_zone  string  | always | Name of network zone Sample: eu-central | |
| type  string  | always | Type of subnetwork Sample: server | |
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.9/modules/hcloud_subnetwork_module.html