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

feat: allow selecting a resource using its ID (#361)

##### SUMMARY

Allow referring to resources using their IDs for:
- hcloud_load_balancer_network
- hcloud_load_balancer_service
- hcloud_load_balancer_target
- hcloud_rdns
- hcloud_route
- hcloud_server_network
- hcloud_subnetwork


##### ISSUE TYPE

- Feature Pull Request


##### COMPONENT NAME
- hcloud_load_balancer_network
- hcloud_load_balancer_service
- hcloud_load_balancer_target
- hcloud_rdns
- hcloud_route
- hcloud_server_network
- hcloud_subnetwork
This commit is contained in:
Jonas L 2023-10-18 10:28:42 +02:00 committed by GitHub
parent bd93d2caf8
commit 5e425c56c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 101 additions and 58 deletions

View file

@ -59,7 +59,7 @@
assert:
that:
- result is failed
- "result.msg == 'Load balancer does not exist: does-not-exist'"
- "result.msg == 'resource (load_balancer) does not exist: does-not-exist'"
- name: test fail network does not exist
hetzner.hcloud.hcloud_load_balancer_network:
@ -72,7 +72,7 @@
assert:
that:
- result is failed
- "result.msg == 'Network does not exist: does-not-exist'"
- "result.msg == 'resource (network) does not exist: does-not-exist'"
- name: test create load_balancer network with checkmode
hetzner.hcloud.hcloud_load_balancer_network:

View file

@ -25,7 +25,7 @@
assert:
that:
- result is failed
- "result.msg == 'Load balancer does not exist: does-not-exist'"
- "result.msg == 'resource (load_balancer) does not exist: does-not-exist'"
- name: test create load_balancer service with checkmode
hetzner.hcloud.hcloud_load_balancer_service:

View file

@ -37,7 +37,7 @@
assert:
that:
- result is failed
- "result.msg == 'Load balancer does not exist: does-not-exist'"
- "result.msg == 'resource (load_balancer) does not exist: does-not-exist'"
- name: test fail server does not exist
hetzner.hcloud.hcloud_load_balancer_target:
@ -50,7 +50,7 @@
assert:
that:
- result is failed
- "result.msg == 'Server not found: does-not-exist'"
- "result.msg == 'resource (server) does not exist: does-not-exist'"
- name: test create load_balancer target with checkmode
hetzner.hcloud.hcloud_load_balancer_target:

View file

@ -70,7 +70,7 @@
assert:
that:
- result is failed
- 'result.msg == "The selected server does not exist"'
- 'result.msg == "resource (server) does not exist: not-existing"'
- name: test create rdns
hetzner.hcloud.hcloud_rdns:
server: "{{ hcloud_server_name }}"