##### SUMMARY
Because the location of a server is not mandatory for creating a server,
we must also check server type deprecation after server creation.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
server
##### SUMMARY
Wait for the floating ip assign action to complete before continuing.
This reduce the chances of running into `locked` errors.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
floating_ip
[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
Add `volume_attachment` module to meta runtime file
##### ISSUE TYPE
- Docs Pull Request
---------
Co-authored-by: jo <ljonas@riseup.net>
##### SUMMARY
The documentation states that all our returned resource ids are
integers, this change aligns our modules with the docs.
The impact of this change should be minimal, as ids are used for
identification purposes by directly forwarding the values (no
transformation of the data is done).
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
All modules
##### 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 alias removal was planned for the version 5.0.0, but I forgot to
remove the alias before cutting the 5.0.0 release (the sanity check only
failed after the release pull request was merged).
Since this is the second time I forgot to remove the deprecated alias, I
will cut a patch release, including this breaking change, as soon as
possible, so we still consider this part of the 5.0.0 release.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
server
Do not detach volume if `server` is not provided
##### SUMMARY
Volumes were automatically detached from servers if they already exists
and attached to a server.
This PR fixes this issue after adding new ```volume_attachment``` module
so user can attach/detach
volumes with that module
Fixes: #490
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
```volume```
---------
Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
##### SUMMARY
Added `volume_attachment` as centralized module for attaching and
detaching volumes from servers.
Fixes#490
##### ISSUE TYPE
- New Module Pull Request
##### COMPONENT NAME
`volume_attachment`
---------
Co-authored-by: jo <ljonas@riseup.net>
##### SUMMARY
Fixes#616
The default value for the `hostvars_prefix` option is now set to
`hcloud_` to prevent name collision with ansible reserved names when
setting the host vars.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
inventory
##### SUMMARY
Fixes#600
Allow renaming a server by passing its id and its new name.
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
server
##### SUMMARY
Add a new state for server creation without immediate start, to allow
idempotent network customization before starting
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
server
---------
Co-authored-by: jo <ljonas@riseup.net>
While we wait a long time on the `create_server` actions, we only wait 2
minutes on any follow up actions like `start_server` or
`attach_network`. This is sometimes not enough. This commit adds a longer
wait timeout for the `next_actions` returned after creating the server.
Co-authored-by: Marco Montesi <marco.montesi@gmail.com>
##### 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
### API Changes for Traffic Prices and Server Type Included Traffic
There will be a breaking change in the API regarding Traffic Prices and
Server Type Included Traffic on 2024-08-05. This release marks the
affected fields as `Deprecated`. Please check if this affects any of
your code and switch to the replacement fields where necessary.
You can learn more about this change in [our
changelog](https://docs.hetzner.cloud/changelog#2024-07-25-cloud-api-returns-traffic-information-in-different-format).
##### 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
- Do not remove the server from its placement group when the
`placement_group` argument is not specified.
- Pass an empty string to the `placement_group` argument to remove a
server from its placement group.
##### SUMMARY
Renamed the `allow_deprecated_image` to `image_allow_deprecated`
argument to ensure the `image` related options use the same namespace.
This is backward compatible, as we introduce a new alias for the old
option name.