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

feat: rename api_endpoint module argument (#395)

##### 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
This commit is contained in:
Jonas L 2023-11-21 10:13:21 +01:00 committed by GitHub
parent 9e0bf59231
commit 7c9fbf85a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 17 deletions

View file

@ -5,22 +5,26 @@
class ModuleDocFragment:
DOCUMENTATION = """
options:
api_token:
description:
- This is the API Token for the Hetzner Cloud.
- You can also set this option by using the environment variable HCLOUD_TOKEN
required: True
type: str
endpoint:
description:
- This is the API Endpoint for the Hetzner Cloud.
default: https://api.hetzner.cloud/v1
type: str
api_token:
description:
- The API Token for the Hetzner Cloud.
- You can also set this option by using the C(HCLOUD_TOKEN) environment variable.
required: True
type: str
api_endpoint:
description:
- The API Endpoint for the Hetzner Cloud.
- You can also set this option by using the C(HCLOUD_ENDPOINT) environment variable.
default: https://api.hetzner.cloud/v1
type: str
aliases: [endpoint]
requirements:
- python-dateutil >= 2.7.5
- requests >=2.20
seealso:
- name: Documentation for Hetzner Cloud API
description: Complete reference for the Hetzner Cloud API.
link: https://docs.hetzner.cloud/
- name: Documentation for Hetzner Cloud API
description: Complete reference for the Hetzner Cloud API.
link: https://docs.hetzner.cloud
"""