##### SUMMARY
We collect all changes for the Storage Box support in this PR. It will
only be merged when everything is implemented through smaller pull
requests targeting the `storage-boxes` branch.
---------
Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
##### SUMMARY
- The order of dns records is not guaranteed, this ensure the module is
idempotent.
- The API defaults to an empty string when comments are not set, ensure
the module is idempotent when no comments are given.
##### ISSUE TYPE
- Bugfix
Closes#740
##### SUMMARY
Attach the server or load balancer to the specific subnet ip_range.
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
- server_network
- load_balancer_network
##### SUMMARY
The format of TXT records must consist of one or many quoted strings of
255 characters.
Use this function to format TXT record that must match the format
required by the API:
```yml
- name: Create a SPF record
hetzner.hcloud.zone_rrset:
zone: example.com
name: "@"
type: "TXT"
records:
- value: "{{ 'v=spf1 include:_spf.example.net ~all' | hetzner.hcloud.text_record }}"
state: present
```
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
zone_rrset
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>
##### 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
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#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
Some action waiting time have been set to an arbitrary number, which
could force the users to wait for too long, while we could have raised a
timeout.
This changes the arbitrary numbers with rough estimate based on the
average actions time and some leeway.
##### 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.
##### SUMMARY
- Allow passing either the name or the ID of a resource to the different
arguments of the server module.
- Split the code into multiple smaller function and improve the code.
- Improve the module arguments documentation.
- Refactor and cleanups.
##### SUMMARY
Since we only support python >=3.8, the `to_native` python2/3
compatibility function is not needed anymore. We only keep it for
printing a traceback free exception message. Where a type conversion is
needed, we use the built-in `str()` function.
##### SUMMARY
The load balancer cookie lifetime field now returns the cookie lifetime
value, instead of the cookie name.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
load_balancer_info
load_balancer_service
##### SUMMARY
The network could not be renamed before. This was discovered while
working on #448
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
network
##### SUMMARY
- Do not silence 'firewall still in use' deletions errors.
- Allow forcing the deletion of a firewall that is still in use.
Fixes#380
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
firewall
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
|
[psf/black-pre-commit-mirror](https://togithub.com/psf/black-pre-commit-mirror)
| repository | major | `23.12.1` -> `24.1.0` |
Note: The `pre-commit` manager in Renovate is not supported by the
`pre-commit` maintainers or community. Please do not report any problems
there, instead [create a Discussion in the Renovate
repository](https://togithub.com/renovatebot/renovate/discussions/new)
if you have any questions.
---
### Release Notes
<details>
<summary>psf/black-pre-commit-mirror
(psf/black-pre-commit-mirror)</summary>
###
[`v24.1.0`](https://togithub.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.0)
[Compare
Source](https://togithub.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.0)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ansible-collections/hetzner.hcloud).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
##### SUMMARY
Replace `ansible.netcommon` deprecated ipaddr utils with python
`ipaddress` module. The `ansible.netcommon` collection is no longer
required by the collections. We still use the `ansible.utils`
collections for testing