-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hetzner.hcloud.hcloud_network module is missing network_zone option #347
Comments
To define the network zone, you should probably use the subnetwork module: https://docs.ansible.com/ansible/latest/collections/hetzner/hcloud/hcloud_subnetwork_module.html#parameter-network_zone |
@jooola We're talking about a network, not a subnetwork. Lookup the hetzner cloud: When you create a network, eu-central is automatically assigned. There is no need to create another subnetwork: Please re-open the request. |
When creating a network on the console, a subnet is automatically added to the network after its creation. If you delete all the subnets in the network, you will be able to create a new subnetwork and define the network zone: If you look at the API reference https://docs.hetzner.cloud/#networks-create-a-network, you can see that the subnetworks are holding the network zone information. So you have to do the following: - name: Create a network
hetzner.hcloud.hcloud_network:
name: my-network
ip_range: 10.0.0.0/8
state: present
- name: Create a subnetwork
hetzner.hcloud.hcloud_subnetwork:
network: my-network
ip_range: 10.0.0.0/16
network_zone: eu-central
type: cloud
state: present |
OK, thank you for clarifying. 👍 |
SUMMARY
Module hetzner.hcloud.hcloud_network doesn't allow setting a zone (e.g.
eu-central
), which is required to attach server.ISSUE TYPE
COMPONENT NAME
hetzner.hcloud.hcloud_network
ANSIBLE VERSION
The text was updated successfully, but these errors were encountered: