Code Monkey home page Code Monkey logo

Comments (4)

jooola avatar jooola commented on June 20, 2024

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

from hetzner.hcloud.

jzielke84 avatar jzielke84 commented on June 20, 2024

@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:

image

Please re-open the request.

from hetzner.hcloud.

jooola avatar jooola commented on June 20, 2024

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:

image

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

from hetzner.hcloud.

jzielke84 avatar jzielke84 commented on June 20, 2024

OK, thank you for clarifying. 👍

from hetzner.hcloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.