1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 16:11:49 +00:00
Commit graph

166 commits

Author SHA1 Message Date
Julian Tölle
241f61338b
fix: unassign primary ip and floating ip before deletion (#796)
##### SUMMARY

Explicitly unassign Primary IP and Floating IPs before deleting them.
This allows us to better handle any errors that happen during the
unassign and is consistent with the flow in our Terraform provider.

##### ISSUE TYPE

- Bugfix Pull Request

##### COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below
-->

- `floating_ip`
- `primary_ip`

---------

Co-authored-by: jo <ljonas@riseup.net>
2026-01-29 11:10:01 +01:00
phm07
98ae62ac94
feat(server): allow setting user_data for rebuild (#794)
##### SUMMARY
`user_data` is now a supported field for rebuilds.
See
https://docs.hetzner.cloud/changelog#2026-01-16-server-rebuild-with-user-data

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
2026-01-26 16:15:42 +01:00
phm07
d52e86d944
feat: Storage Box support no longer experimental (#793)
##### SUMMARY

Storage Box support is no longer experimental and the warnings can be
removed.


Closes #756

---------

Co-authored-by: jo <ljonas@riseup.net>
2026-01-23 16:29:00 +01:00
Jonas L.
2c6dbedec1
feat: add name to Storage Box Subaccount (#787)
##### SUMMARY

Replaces the label based name workaround for Storage Box Subaccounts,
with the new Storage Box Subaccount name property managed in the API.

##### ISSUE TYPE

- Feature Pull Request


##### COMPONENT NAME

- `storage_box_subaccount`
- `storage_box_subaccount_info`
2026-01-16 14:05:34 +01:00
Florian Weber
e4512d8733
docs: add note that server.user_data is used by cloud-init (#786)
##### SUMMARY
I was looking for "cloud" or "cloud-init" within the documentation
without any luck. Maybe this will help someone else finding the
appropriate option.

##### ISSUE TYPE
- Docs Pull Request

##### COMPONENT NAME
`hetzner.hcloud.server`

---------

Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
2026-01-13 14:22:04 +01:00
Jonas L.
cfa0d181f7
refactor: mark module_utils modules as private (#782)
##### SUMMARY

All `module_utils` are now marked as **private**. None of the modules
were intended for public use.

Similar to
https://togithub.com/ansible-collections/community.general/issues/11312
2026-01-06 08:43:46 +01:00
Jonas L.
10c41f032b
feat: deprecate datacenter in primary ips and servers (#773)
##### SUMMARY

Deprecate datacenter in `primary ips` and `servers`.

See
https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters.
2026-01-05 16:44:04 +01:00
Jonas L.
f204b21ee0
docs: do not use type: complex for return values (#774)
##### SUMMARY

Improve return documentation by documenting the real type of the return
values.
2025-12-17 15:57:40 +01:00
Jonas L.
10c0e14d9d
refactor: fix primary ip module need_reload default value (#772)
##### SUMMARY

Related to #771
2025-12-16 16:59:28 +01:00
Jonas L.
b4616f3af8
refactor: modernize floating_ip and primary_ip modules (#771)
##### SUMMARY

Use the latest best practices for modules, and prepare for the upcoming
changes.
2025-12-16 16:13:31 +01:00
Jonas L.
5394c6f246
feat: add support for Storage Boxes (#676)
##### 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>
2025-12-10 13:18:36 +01:00
Jonas L.
79f78fae28
fix: zone rrset idempotency (#737)
##### 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
2025-11-17 14:45:04 +01:00
Jonas L.
337067d9de
feat: DNS support is now generally available (#727)
##### SUMMARY

DNS support is now general available.

See https://docs.hetzner.cloud/changelog#2025-11-10-dns-ga for more
details.

##### ISSUE TYPE

- Feature Pull Request
2025-11-10 11:52:37 +01:00
renovate[bot]
871bc897bf
chore(deps): update dependency hcloud to v2.10.0 (#728) 2025-11-10 10:23:01 +01:00
Jonas L.
66aaef7be4
feat: attach server or load balancer to specific subnet (#726)
##### 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
2025-11-05 16:15:08 +01:00
Jonas L.
907a7fd73c
fix: firewall idempotency with ipv6 addresses (#722)
##### SUMMARY

Always use the canonical address representation when checking if rules
changed.


Fixes #708
2025-10-31 14:45:06 +01:00
Jonas L.
7ac361a9cc
feat: add txt_record filter to format TXT records (#721)
##### 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
2025-10-31 12:36:19 +01:00
Julian Tölle
59c539c48b
docs: update deprecated server types (#718)
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>
2025-10-28 13:45:41 +01:00
Jonas L.
adddef5fc0
feat: support the new DNS API (#703)
Add support for the new [DNS
API](https://docs.hetzner.cloud/reference/cloud#dns).

The DNS API is currently in **beta**.

See the [DNS API beta
changelog](https://docs.hetzner.cloud/changelog#2025-10-07-dns-beta) for
more details.
2025-10-07 11:04:00 +02:00
Jonas L.
c4dc19c675
fix: also check server type deprecation after server creation (#696)
##### 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
2025-09-29 14:34:54 +02:00
Jonas L.
c3ec5d1dcc
fix: wait for floating ip assign action (#694)
##### 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
2025-09-26 11:50:14 +02:00
Jonas L.
826e6a5309
feat: per location server types (#692)
[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
```
2025-09-26 11:50:05 +02:00
Jonas L.
3d809cbc6f
feat: return server type category (#687)
##### SUMMARY

Related to
https://docs.hetzner.cloud/changelog#2025-08-25-category-for-server-types
2025-09-08 13:02:45 +02:00
Amirhossein Shaerpour
8c8a52ceed
feat: allow renaming a volume (#683)
##### SUMMARY
Allow renaming volume
Fixes #681 

##### ISSUE TYPE
- Feature Pull Request

##### COMPONENT NAME
`volume`

---------

Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
2025-08-14 15:02:28 +02:00
Jonas L.
84748a7081
docs: add link to rdns module for resource with dns pointers (#664)
##### SUMMARY

Fixes #662 

##### ISSUE TYPE

- Docs Pull Request
2025-06-27 10:23:01 +02:00
Jonas L.
579b34e754
fix: ensure returned resource ids are integers (#651)
##### 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
2025-06-11 10:09:12 +02:00
Amirhossein Shaerpour
4fc2003f30
feat: allow recreating ssh key when public key in the API does not match (#634)
##### 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>
2025-06-03 17:43:54 +02:00
Jonas L.
88f84e7d7c
fix: remove deprecated force_upgrade argument (#637)
##### 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
2025-05-21 17:43:16 +02:00
Jonas L.
88008eeaea
docs: missing root_password return value docs (#635)
##### SUMMARY

The `root_password` return value was undocumented. 

##### ISSUE TYPE

- Docs Pull Request

##### COMPONENT NAME

server
2025-05-21 16:45:13 +02:00
Amirhossein Shaerpour
e8fda3557c
fix!: do not detach volume if server is not provided (#632)
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>
2025-05-07 10:44:39 +02:00
Amirhossein Shaerpour
c37cdf0bc6
feat: add volume_attachment module (#622)
##### 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>
2025-04-28 12:49:21 +02:00
Jonas L.
e59e787d99
feat: allow renaming a server (#619)
##### SUMMARY

Fixes #600

Allow renaming a server by passing its id and its new name.

##### ISSUE TYPE

- Feature Pull Request


##### COMPONENT NAME

server
2025-03-25 17:34:59 +01:00
Daniele Fognini
4534cf6b9d
feat: add new created state for idempotent server creation (#606)
##### 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>
2025-03-21 14:05:03 +01:00
Jonas L.
6956596fd2
fix: only update load balancer service when changed (#603)
##### SUMMARY

We only was to perform an update call when a value changed, or we end up
with an empty update request.
2025-02-24 14:26:58 +01:00
Jonas L.
06718d0db0
fix: only rebuild existing servers, skip rebuild if it was just created (#581)
##### SUMMARY

Fixes #580

A freshly created server must not be rebuild.

##### ISSUE TYPE

- Bugfix Pull Request


##### COMPONENT NAME

server
2024-11-11 17:09:37 +01:00
Jonas L.
fe3bfa9020
fix: improve unknown certificate error in load_balancer_service (#570)
##### SUMMARY

Closes #563 

##### ISSUE TYPE

- Bugfix Pull Request

##### COMPONENT NAME

load_balancer_service
2024-10-10 15:19:16 +02:00
Julian Tölle
98e9c52c74
fix(server): timeout in server creation when waiting on next actions (#561)
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>
2024-09-23 09:00:57 +02:00
Seb d'Argoeuves
b39d7626b5
docs: fix firewall_resource examples input parameters (#557)
In the example, we should use `firewall` instead of `name` as per the
options described at the top of the documentation.
2024-09-12 13:42:11 +02:00
Jonas L.
fce8bc9bb9
feat: compute load balancer targets status using a filter (#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
2024-08-14 14:18:39 +02:00
Jonas L.
39aa356c4c
feat: deprecate server_type_info included_traffic return value (#532)
### 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).
2024-07-25 13:45:29 +02:00
Jonas L
19e586fa22
feat: use exponential backoff algorithm when polling actions (#524)
##### 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
```
2024-07-04 15:07:05 +02:00
renovate[bot]
9adb8b3981
chore(deps): update dependency hcloud to v2 (#523)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [hcloud](https://togithub.com/hetznercloud/hcloud-python)
([changelog](https://togithub.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md))
| `1.35.0` -> `2.0.1` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/hcloud/2.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/hcloud/2.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/hcloud/1.35.0/2.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/hcloud/1.35.0/2.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>hetznercloud/hcloud-python (hcloud)</summary>

###
[`v2.0.1`](https://togithub.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#201-2024-07-03)

[Compare
Source](https://togithub.com/hetznercloud/hcloud-python/compare/v2.0.0...v2.0.1)

##### Bug Fixes

- `assignee_type` is required when creating a primary ip
([#&#8203;409](https://togithub.com/hetznercloud/hcloud-python/issues/409))
([bce5e94](bce5e940e2))
- clean unused arguments in the `Client.servers.rebuild` method
([#&#8203;407](https://togithub.com/hetznercloud/hcloud-python/issues/407))
([6d33c3c](6d33c3cff5))
- details are optional in API errors
([#&#8203;411](https://togithub.com/hetznercloud/hcloud-python/issues/411))
([f1c6594](f1c6594dee))
- rename `trace_id` variable to `correlation_id`
([#&#8203;408](https://togithub.com/hetznercloud/hcloud-python/issues/408))
([66a0f54](66a0f54699))

###
[`v2.0.0`](https://togithub.com/hetznercloud/hcloud-python/blob/HEAD/CHANGELOG.md#200-2024-07-03)

[Compare
Source](https://togithub.com/hetznercloud/hcloud-python/compare/v1.35.0...v2.0.0)

##### ⚠ BREAKING CHANGES

- return full rebuild response in `Client.servers.rebuild`
([#&#8203;406](https://togithub.com/hetznercloud/hcloud-python/issues/406))
- make `datacenter` argument optional when creating a primary ip
([#&#8203;363](https://togithub.com/hetznercloud/hcloud-python/issues/363))
- remove deprecated `include_wildcard_architecture` argument in
`IsosClient.get_list` and `IsosClient.get_all`
([#&#8203;402](https://togithub.com/hetznercloud/hcloud-python/issues/402))
- make `Client.request` `tries` a private argument
([#&#8203;399](https://togithub.com/hetznercloud/hcloud-python/issues/399))
- make `Client.poll_interval` a private property
([#&#8203;398](https://togithub.com/hetznercloud/hcloud-python/issues/398))
- return empty dict on empty responses in `Client.request`
([#&#8203;400](https://togithub.com/hetznercloud/hcloud-python/issues/400))
- remove deprecated `hcloud.hcloud` module
([#&#8203;401](https://togithub.com/hetznercloud/hcloud-python/issues/401))
- move `hcloud.__version__.VERSION` to `hcloud.__version__`
([#&#8203;397](https://togithub.com/hetznercloud/hcloud-python/issues/397))

##### Features

- add `trace_id` to API exceptions
([#&#8203;404](https://togithub.com/hetznercloud/hcloud-python/issues/404))
([8375261](8375261da3))
- allow using a custom poll_interval function
([#&#8203;403](https://togithub.com/hetznercloud/hcloud-python/issues/403))
([93eb56b](93eb56ba4d))
- make `Client.poll_interval` a private property
([#&#8203;398](https://togithub.com/hetznercloud/hcloud-python/issues/398))
([d5f24db](d5f24db281))
- make `Client.request` `tries` a private argument
([#&#8203;399](https://togithub.com/hetznercloud/hcloud-python/issues/399))
([428ea7e](428ea7e3be))
- move `hcloud.__version__.VERSION` to `hcloud.__version__`
([#&#8203;397](https://togithub.com/hetznercloud/hcloud-python/issues/397))
([4e3f638](4e3f638862)),
closes
[#&#8203;234](https://togithub.com/hetznercloud/hcloud-python/issues/234)
- remove deprecated `hcloud.hcloud` module
([#&#8203;401](https://togithub.com/hetznercloud/hcloud-python/issues/401))
([db37e63](db37e633eb))
- remove deprecated `include_wildcard_architecture` argument in
`IsosClient.get_list` and `IsosClient.get_all`
([#&#8203;402](https://togithub.com/hetznercloud/hcloud-python/issues/402))
([6b977e2](6b977e2da5))
- return empty dict on empty responses in `Client.request`
([#&#8203;400](https://togithub.com/hetznercloud/hcloud-python/issues/400))
([9f46adb](9f46adb946))
- return full rebuild response in `Client.servers.rebuild`
([#&#8203;406](https://togithub.com/hetznercloud/hcloud-python/issues/406))
([1970d84](1970d84bec))

##### Bug Fixes

- make `datacenter` argument optional when creating a primary ip
([#&#8203;363](https://togithub.com/hetznercloud/hcloud-python/issues/363))
([ebef774](ebef77464c))

##### Dependencies

- update dependency coverage to >=7.5,<7.6
([#&#8203;386](https://togithub.com/hetznercloud/hcloud-python/issues/386))
([5660691](5660691ebd))
- update dependency mypy to >=1.10,<1.11
([#&#8203;387](https://togithub.com/hetznercloud/hcloud-python/issues/387))
([35c933b](35c933bd21))
- update dependency myst-parser to v3
([#&#8203;385](https://togithub.com/hetznercloud/hcloud-python/issues/385))
([9f18270](9f18270489))
- update dependency pylint to >=3,<3.3
([#&#8203;391](https://togithub.com/hetznercloud/hcloud-python/issues/391))
([4a6f005](4a6f005cb0))
- update dependency pytest to >=8,<8.3
([#&#8203;390](https://togithub.com/hetznercloud/hcloud-python/issues/390))
([584a36b](584a36b658))
- update dependency sphinx to >=7.3.4,<7.4
([#&#8203;383](https://togithub.com/hetznercloud/hcloud-python/issues/383))
([69c2e16](69c2e16073))
- update pre-commit hook asottile/pyupgrade to v3.16.0
([0ce5fbc](0ce5fbccba))
- update pre-commit hook pre-commit/pre-commit-hooks to v4.6.0
([5ef25ab](5ef25ab396))
- update pre-commit hook psf/black-pre-commit-mirror to v24.4.0
([0941fbf](0941fbfab2))
- update pre-commit hook psf/black-pre-commit-mirror to v24.4.1
([fec08c5](fec08c5323))
- update pre-commit hook psf/black-pre-commit-mirror to v24.4.2
([#&#8203;389](https://togithub.com/hetznercloud/hcloud-python/issues/389))
([2b2e21f](2b2e21f613))
- update pre-commit hook pycqa/flake8 to v7.1.0
([3bc651d](3bc651d50d))

##### Documentation

- add v2 upgrade notes
([#&#8203;405](https://togithub.com/hetznercloud/hcloud-python/issues/405))
([c77f771](c77f771e2b))
- cx11 is name, not an id
([#&#8203;381](https://togithub.com/hetznercloud/hcloud-python/issues/381))
([b745d40](b745d4049f))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jo <ljonas@riseup.net>
2024-07-03 15:05:12 +02:00
Jonas L
49e21ae4fe
fix: keep deprecated alias for another major version (#515)
This was not removed during the v4.0.0 release, we must therefor
reschedule it for the v5.0.0 release.
2024-06-11 16:55:27 +02:00
Jonas L
fb8c2a9f58
chore: replace deprecated server type with cx22 (#510)
Learn more:
https://docs.hetzner.cloud/changelog#2024-06-06-old-server-types-with-shared-intel-vcpus-are-deprecated

- Updated docs with newer server types
- Use ARM server type for tests
2024-06-11 15:30:47 +02:00
Jonas L
07095529a4
fix: improve actions waiting timeout based on data (#488)
##### 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.
2024-04-15 11:01:12 +02:00
Jonas L
d88ecdbccc
feat: rename server image_allow_deprecated option (#487)
##### 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.
2024-04-04 12:40:24 +02:00
Jonas L
7fdefcfa02
feat: use resources name or ID in server module arguments (#484)
##### 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.
2024-04-04 11:54:41 +02:00
Jonas L
022cca4799
docs: use argument spec to mark force_upgrade as deprecated (#481)
##### SUMMARY

Leverage the alias feature from the argument spec, and re-declare the
deprecation of the `force_upgrade` argument.
2024-04-04 11:49:16 +02:00
Jonas L
4bb02b9cd2
refactor: remove unneeded to_native calls (#477)
##### 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.
2024-03-27 14:11:30 +01:00
jjeff07
51afb23166
feat: assign primary ip to a server on create (#465)
##### SUMMARY

Fixes #464 

##### ISSUE TYPE
- Feature Pull Request

##### COMPONENT NAME
primary_ip

---------

Co-authored-by: jo <ljonas@riseup.net>
2024-03-11 18:20:30 +01:00