From 59c539c48b0307638c9bbd1b1eb020a7115706cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Tue, 28 Oct 2025 13:45:41 +0100 Subject: [PATCH] docs: update deprecated server types (#718) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CX Gen 2 and CPX Gen 1 types are deprecated and will be removed from the API at the end of the year. This replaces all usages in our docs, so users do not have to figure it out themselves. Changelog Entry: https://docs.hetzner.cloud/changelog#2025-10-16-server-types-deprecated Co-authored-by: Petteri Räty --- docs/docsite/rst/guides.rst | 4 ++-- examples/server-assign-to-subnetwork.yml | 2 +- examples/server-with-firewall.yml | 2 +- examples/server-with-private-ip-only.yml | 2 +- examples/use-module-defaults-group.yml | 2 +- examples/use-refresh-inventory.yml | 2 +- examples/validate-server-type.yml | 2 +- plugins/inventory/hcloud.py | 6 +++--- plugins/modules/load_balancer.py | 2 +- plugins/modules/load_balancer_info.py | 2 +- plugins/modules/network_info.py | 2 +- plugins/modules/server.py | 8 ++++---- plugins/modules/server_info.py | 2 +- tests/unit/inventory/test_hcloud.py | 6 +++--- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/docsite/rst/guides.rst b/docs/docsite/rst/guides.rst index 79ae2a4..ceb2ac7 100644 --- a/docs/docsite/rst/guides.rst +++ b/docs/docsite/rst/guides.rst @@ -23,7 +23,7 @@ Alternatively, you may provide the API token directly as module argument: hetzner.hcloud.server: api_token: LRK9DAWQ1ZAEFSrCNEEzLCUwhYX1U3g7wMg4dTlkkDC96fyDuyJ39nVbVjCKSDfj name: my-server - server_type: cx22 + server_type: cpx22 image: debian-12 state: present @@ -45,7 +45,7 @@ example if you want to store your API token in a vault: - name: Create server hetzner.hcloud.server: name: my-server - server_type: cx22 + server_type: cpx22 image: debian-12 state: present diff --git a/examples/server-assign-to-subnetwork.yml b/examples/server-assign-to-subnetwork.yml index efc9fc1..25a6eb7 100644 --- a/examples/server-assign-to-subnetwork.yml +++ b/examples/server-assign-to-subnetwork.yml @@ -38,7 +38,7 @@ - name: Create servers hetzner.hcloud.server: name: "{{ item.name }}" - server_type: cx22 + server_type: cpx22 image: debian-12 state: present loop: "{{ servers }}" diff --git a/examples/server-with-firewall.yml b/examples/server-with-firewall.yml index 6d123be..ff6decf 100644 --- a/examples/server-with-firewall.yml +++ b/examples/server-with-firewall.yml @@ -31,7 +31,7 @@ - name: Create servers hetzner.hcloud.server: name: "{{ item.name }}" - server_type: cx22 + server_type: cpx22 image: debian-12 labels: kind: runners diff --git a/examples/server-with-private-ip-only.yml b/examples/server-with-private-ip-only.yml index f92150c..96b26e7 100644 --- a/examples/server-with-private-ip-only.yml +++ b/examples/server-with-private-ip-only.yml @@ -28,7 +28,7 @@ - name: Create servers without public IPs hetzner.hcloud.server: name: "{{ item.name }}" - server_type: cx22 + server_type: cpx22 image: debian-12 enable_ipv4: false enable_ipv6: false diff --git a/examples/use-module-defaults-group.yml b/examples/use-module-defaults-group.yml index 74267bb..379a372 100644 --- a/examples/use-module-defaults-group.yml +++ b/examples/use-module-defaults-group.yml @@ -19,7 +19,7 @@ - name: Create a server hetzner.hcloud.server: name: my-server - server_type: cx22 + server_type: cpx22 image: debian-12 location: fsn1 volumes: diff --git a/examples/use-refresh-inventory.yml b/examples/use-refresh-inventory.yml index d801e7c..fd989f5 100644 --- a/examples/use-refresh-inventory.yml +++ b/examples/use-refresh-inventory.yml @@ -11,7 +11,7 @@ - name: Create new server hetzner.hcloud.server: name: my-server - server_type: cx22 + server_type: cpx22 image: debian-12 - name: Refresh inventory diff --git a/examples/validate-server-type.yml b/examples/validate-server-type.yml index 2692348..4e0151a 100644 --- a/examples/validate-server-type.yml +++ b/examples/validate-server-type.yml @@ -10,7 +10,7 @@ - name: Fetch server type info hetzner.hcloud.server_type_info: - name: cx22 + name: cpx22 register: server_type - name: Ensure server type exists diff --git a/plugins/inventory/hcloud.py b/plugins/inventory/hcloud.py index 899f5ce..0fb8981 100644 --- a/plugins/inventory/hcloud.py +++ b/plugins/inventory/hcloud.py @@ -135,7 +135,7 @@ plugin: hetzner.hcloud.hcloud locations: - nbg1 types: - - cx22 + - cpx22 status: - running @@ -164,8 +164,8 @@ plugin: hetzner.hcloud.hcloud # foo: "bar" # hcloud_status: "running" ## Server Type -# hcloud_type: "cx22" -# hcloud_server_type: "cx22" +# hcloud_type: "cpx22" +# hcloud_server_type: "cpx22" # hcloud_architecture: "x86" ## Image # hcloud_image_id: 114690387 diff --git a/plugins/modules/load_balancer.py b/plugins/modules/load_balancer.py index 5b6a57a..1593329 100644 --- a/plugins/modules/load_balancer.py +++ b/plugins/modules/load_balancer.py @@ -109,7 +109,7 @@ hcloud_load_balancer: description: Name of the Load Balancer type of the Load Balancer returned: always type: str - sample: cx22 + sample: lb11 algorithm: description: Algorithm of the Load Balancer. returned: always diff --git a/plugins/modules/load_balancer_info.py b/plugins/modules/load_balancer_info.py index 6a96282..286ff94 100644 --- a/plugins/modules/load_balancer_info.py +++ b/plugins/modules/load_balancer_info.py @@ -68,7 +68,7 @@ hcloud_load_balancer_info: description: Name of the Load Balancer type of the Load Balancer returned: always type: str - sample: cx22 + sample: lb11 ipv4_address: description: Public IPv4 address of the Load Balancer returned: always diff --git a/plugins/modules/network_info.py b/plugins/modules/network_info.py index e24f9fc..c6d4ca0 100644 --- a/plugins/modules/network_info.py +++ b/plugins/modules/network_info.py @@ -138,7 +138,7 @@ hcloud_network_info: description: Name of the server type of the server returned: always type: str - sample: cx22 + sample: cpx22 ipv4_address: description: Public IPv4 address of the server, None if not existing returned: always diff --git a/plugins/modules/server.py b/plugins/modules/server.py index c81e1f7..a7021c2 100644 --- a/plugins/modules/server.py +++ b/plugins/modules/server.py @@ -161,14 +161,14 @@ EXAMPLES = """ - name: Create a basic server hetzner.hcloud.server: name: my-server - server_type: cx22 + server_type: cpx22 image: ubuntu-22.04 state: present - name: Create a basic server with ssh key hetzner.hcloud.server: name: my-server - server_type: cx22 + server_type: cpx22 image: ubuntu-22.04 location: fsn1 ssh_keys: @@ -178,7 +178,7 @@ EXAMPLES = """ - name: Resize an existing server hetzner.hcloud.server: name: my-server - server_type: cx32 + server_type: cpx22 upgrade_disk: true state: present @@ -268,7 +268,7 @@ hcloud_server: description: Name of the server type of the server returned: always type: str - sample: cx22 + sample: cpx22 ipv4_address: description: Public IPv4 address of the server returned: always diff --git a/plugins/modules/server_info.py b/plugins/modules/server_info.py index 39055a6..4717ba2 100644 --- a/plugins/modules/server_info.py +++ b/plugins/modules/server_info.py @@ -78,7 +78,7 @@ hcloud_server_info: description: Name of the server type of the server returned: always type: str - sample: cx22 + sample: cpx22 ipv4_address: description: Public IPv4 address of the server returned: always diff --git a/tests/unit/inventory/test_hcloud.py b/tests/unit/inventory/test_hcloud.py index b5d3b77..9c5b5c9 100644 --- a/tests/unit/inventory/test_hcloud.py +++ b/tests/unit/inventory/test_hcloud.py @@ -38,7 +38,7 @@ def test_build_inventory_server(): "firewalls": [], }, "private_net": [], - "server_type": {"id": 1, "name": "cx11", "architecture": "x86"}, + "server_type": {"id": 109, "name": "cpx22", "architecture": "x86"}, "datacenter": { "id": 3, "name": "hel1-dc2", @@ -57,8 +57,8 @@ def test_build_inventory_server(): "id": 45921624, "name": "my-server", "status": "running", - "type": "cx11", - "server_type": "cx11", + "type": "cpx22", + "server_type": "cpx22", "architecture": "x86", "location": "hel1", "datacenter": "hel1-dc2",