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 <github@petteriraty.eu>
[Server Types](https://docs.hetzner.cloud/reference/cloud#server-types)
now depend on
[Locations](https://docs.hetzner.cloud/reference/cloud#locations).
- We added a new `locations` property to the [Server
Types](https://docs.hetzner.cloud/reference/cloud#server-types)
resource. The new property defines a list of supported
[Locations](https://docs.hetzner.cloud/reference/cloud#locations) and
additional per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
details such as deprecations information.
- We deprecated the `deprecation` property from the [Server
Types](https://docs.hetzner.cloud/reference/cloud#server-types)
resource. The property will gradually be phased out as per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
deprecations are being announced. Please use the new per
[Locations](https://docs.hetzner.cloud/reference/cloud#locations)
deprecation information instead.
See our
[changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types)
for more details.
**Upgrading**
```yaml
---
- name: Validate server type
hosts: localhost
connection: local
tasks:
- name: Fetch server type info
hetzner.hcloud.server_type_info:
name: cx22
register: server_type
- name: Ensure server type exists
ansible.builtin.assert:
fail_msg: server type does not exists
that:
- server_type.hcloud_server_type_info | count == 1
- name: Ensure server type is not deprecated
ansible.builtin.assert:
fail_msg: server type is deprecated
that:
- server_type.hcloud_server_type_info[0].deprecation is none
```
```yaml
---
- name: Validate server type
hosts: localhost
connection: local
tasks:
- name: Fetch location info
hetzner.hcloud.location_info:
name: fsn1
register: location
- name: Fetch server type info
hetzner.hcloud.server_type_info:
name: cx22
register: server_type
- name: Ensure server type exists
ansible.builtin.assert:
fail_msg: server type does not exists
that:
- server_type.hcloud_server_type_info | count == 1
- name: Extract server type location info
ansible.builtin.set_fact:
server_type_location: >
{{
server_type.hcloud_server_type_info[0].locations
| selectattr("name", "eq", location.hcloud_location_info[0].name)
| first
}}
- name: Ensure server type is not deprecated
ansible.builtin.assert:
fail_msg: server type is deprecated in location
that:
- server_type_location.deprecation is none
```
##### SUMMARY
- Log a warning when the provided public key does not match one in the
API.
- When the public key does not match the one in the API, allow
recreating the SSH Key in the API using the ``force=true`` argument.
Closes: #578
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below
-->
`ssh_key`
##### ADDITIONAL INFORMATION
In Hetzner API, we do not have any public_key change endpoint and only
updating names and labels are allowed.
For public_key The only way is removing and re-creating. `force` option
allows users to do re-creation if needed.
---------
Co-authored-by: jo <ljonas@riseup.net>
##### SUMMARY
The previous implementation did not take into consideration label
selectors targets, and their child targets.
This change implements a recursive function that traverse all the
targets.
Related to #467#550
##### SUMMARY
Allow to compute the status of a load balancer using a filter.
Closes#467
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
hetzner.hcloud.loab_balancer_status
##### SUMMARY
Replace the constant poll interval of 1 second, with a truncated
exponential back off algorithm with jitter.
Below is a suite of poll interval (in seconds) generated by the new
algorithm:
```
1.49
2.14
5.46
6.51
6.57
5.57
5.98
7.13
6.59
7.10
5.54
5.03
6.56
5.96
6.72
7.21
7.05
5.31
5.60
6.33
6.82
5.42
6.08
6.60
TOTAL: 140.77
```
##### SUMMARY
Add a small helper to validate parameters while executing the module.
---------
Co-authored-by: Justin Jeffery <justin.jeffery@ipfabric.io>
##### SUMMARY
Make the api endpoint module argument consistent with the api token.
- Renamed the `endpoint` module argument to `api_endpoint`, backward
compatibility is maintained using an alias.
- Allow to configure it using the `HCLOUD_ENDPOINT` env var.
This makes the inventory config and the modules config a bit more
consistent.
##### ISSUE TYPE
- Feature Pull Request