Skip to content

Commit 7e62f7c

Browse files
bpg-devclaude
andcommitted
feat(provider): add short-name aliases for cluster resources (ADR-007)
Add proxmox_cluster_options, proxmox_metrics_server, proxmox_replication resources and proxmox_metrics_server, proxmox_replication, proxmox_replications datasources as short-name aliases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Pavel Boldyrev <pavel@bpg.sh>
1 parent b2bb732 commit 7e62f7c

27 files changed

+737
-5
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: page
3+
title: proxmox_metrics_server
4+
parent: Data Sources
5+
subcategory: Virtual Environment
6+
description: |-
7+
Retrieves information about a specific PVE metric server.
8+
---
9+
10+
# Data Source: proxmox_metrics_server
11+
12+
Retrieves information about a specific PVE metric server.
13+
14+
15+
16+
<!-- schema generated by tfplugindocs -->
17+
## Schema
18+
19+
### Required
20+
21+
- `name` (String) Unique name that will be ID of this metric server in PVE.
22+
23+
### Read-Only
24+
25+
- `disable` (Boolean) Indicates if the metric server is disabled.
26+
- `id` (String) The unique identifier of this resource.
27+
- `opentelemetry_compression` (String) OpenTelemetry compression algorithm for requests.
28+
- `opentelemetry_headers` (String, Sensitive) OpenTelemetry custom HTTP headers as JSON, base64 encoded.
29+
- `opentelemetry_max_body_size` (Number) OpenTelemetry maximum request body size in bytes.
30+
- `opentelemetry_path` (String) OpenTelemetry endpoint path (e.g., `/v1/metrics`).
31+
- `opentelemetry_proto` (String) Protocol for OpenTelemetry. Choice is between `http` | `https`.
32+
- `opentelemetry_resource_attributes` (String) OpenTelemetry additional resource attributes as JSON, base64 encoded.
33+
- `opentelemetry_timeout` (Number) OpenTelemetry HTTP request timeout in seconds.
34+
- `opentelemetry_verify_ssl` (Boolean) OpenTelemetry verify SSL certificates.
35+
- `port` (Number) Server network port.
36+
- `server` (String) Server dns name or IP address.
37+
- `type` (String) Plugin type. Either `graphite`, `influxdb`, or `opentelemetry`.

docs/data-sources/replication.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: page
3+
title: proxmox_replication
4+
parent: Data Sources
5+
subcategory: Virtual Environment
6+
description: |-
7+
Retrieves information about an existing Replication.
8+
---
9+
10+
# Data Source: proxmox_replication
11+
12+
Retrieves information about an existing Replication.
13+
14+
15+
16+
<!-- schema generated by tfplugindocs -->
17+
## Schema
18+
19+
### Required
20+
21+
- `id` (String) Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
22+
23+
### Read-Only
24+
25+
- `comment` (String) Description.
26+
- `disable` (Boolean) Flag to disable/deactivate this replication.
27+
- `guest` (Number) Guest ID.
28+
- `jobnum` (Number) Unique, sequential ID assigned to each job.
29+
- `rate` (Number) Rate limit in mbps (megabytes per second) as floating point number.
30+
- `schedule` (String) Storage replication schedule. The format is a subset of `systemd` calendar events. Defaults to */15
31+
- `source` (String) For internal use, to detect if the guest was stolen.
32+
- `target` (String) Target node.
33+
- `type` (String) Section type.

docs/data-sources/replications.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
layout: page
3+
title: proxmox_replications
4+
parent: Data Sources
5+
subcategory: Virtual Environment
6+
description: |-
7+
Retrieves information about all Replications in Proxmox.
8+
---
9+
10+
# Data Source: proxmox_replications
11+
12+
Retrieves information about all Replications in Proxmox.
13+
14+
15+
16+
<!-- schema generated by tfplugindocs -->
17+
## Schema
18+
19+
### Read-Only
20+
21+
- `replications` (List of Object) List of Replications. (see [below for nested schema](#nestedatt--replications))
22+
23+
<a id="nestedatt--replications"></a>
24+
### Nested Schema for `replications`
25+
26+
Read-Only:
27+
28+
- `comment` (String)
29+
- `disable` (Boolean)
30+
- `guest` (Number)
31+
- `id` (String)
32+
- `jobnum` (Number)
33+
- `rate` (Number)
34+
- `remove_job` (String)
35+
- `schedule` (String)
36+
- `source` (String)
37+
- `target` (String)
38+
- `type` (String)

docs/data-sources/virtual_environment_metrics_server.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
# Data Source: proxmox_virtual_environment_metrics_server
1111

12+
~> **Deprecated:** Use [`proxmox_metrics_server`](metrics_server.md) instead. This data source will be removed in v1.0.
13+
1214
Retrieves information about a specific PVE metric server.
1315

1416
## Example Usage

docs/data-sources/virtual_environment_replication.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
# Data Source: proxmox_virtual_environment_replication
1111

12+
~> **Deprecated:** Use [`proxmox_replication`](replication.md) instead. This data source will be removed in v1.0.
13+
1214
Retrieves information about an existing Replication.
1315

1416
## Example Usage

docs/data-sources/virtual_environment_replications.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
# Data Source: proxmox_virtual_environment_replications
1111

12+
~> **Deprecated:** Use [`proxmox_replications`](replications.md) instead. This data source will be removed in v1.0.
13+
1214
Retrieves information about all Replications in Proxmox.
1315

1416
## Example Usage

docs/resources/cluster_options.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
layout: page
3+
title: proxmox_cluster_options
4+
parent: Resources
5+
subcategory: Virtual Environment
6+
description: |-
7+
Manages Proxmox VE Cluster Datacenter options.
8+
---
9+
10+
# Resource: proxmox_cluster_options
11+
12+
Manages Proxmox VE Cluster Datacenter options.
13+
14+
15+
16+
<!-- schema generated by tfplugindocs -->
17+
## Schema
18+
19+
### Optional
20+
21+
- `bandwidth_limit_clone` (Number) Clone I/O bandwidth limit in KiB/s.
22+
- `bandwidth_limit_default` (Number) Default I/O bandwidth limit in KiB/s.
23+
- `bandwidth_limit_migration` (Number) Migration I/O bandwidth limit in KiB/s.
24+
- `bandwidth_limit_move` (Number) Move I/O bandwidth limit in KiB/s.
25+
- `bandwidth_limit_restore` (Number) Restore I/O bandwidth limit in KiB/s.
26+
- `console` (String) Select the default Console viewer. Must be `applet` | `vv`| `html5` | `xtermjs`. You can either use the builtin java applet (VNC; deprecated and maps to html5), an external virt-viewer compatible application (SPICE), an HTML5 based vnc viewer (noVNC), or an HTML5 based console client (xtermjs). If the selected viewer is not available (e.g. SPICE not activated for the VM), the fallback is noVNC.
27+
- `crs_ha` (String) Cluster resource scheduling setting for HA. Must be `static` | `basic` (default is `basic`).
28+
- `crs_ha_rebalance_on_start` (Boolean) Cluster resource scheduling setting for HA rebalance on start.
29+
- `description` (String) Datacenter description. Shown in the web-interface datacenter notes panel. This is saved as comment inside the configuration file.
30+
- `email_from` (String) email address to send notification from (default is root@$hostname).
31+
- `ha_shutdown_policy` (String) Cluster wide HA shutdown policy (). Must be `freeze` | `failover` | `migrate` | `conditional` (default is `conditional`).
32+
- `http_proxy` (String) Specify external http proxy which is used for downloads (example: `http://username:password@host:port/`).
33+
- `keyboard` (String) Default keyboard layout for vnc server. Must be `de` | `de-ch` | `da` | `en-gb` | `en-us` | `es` | `fi` | `fr` | `fr-be` | `fr-ca` | `fr-ch` | `hu` | `is` | `it` | `ja` | `lt` | `mk` | `nl` | `no` | `pl` | `pt` | `pt-br` | `sv` | `sl` | `tr`.
34+
- `language` (String) Default GUI language. Must be `ca` | `da` | `de` | `en` | `es` | `eu` | `fa` | `fr` | `he` | `it` | `ja` | `nb` | `nn` | `pl` | `pt_BR` | `ru` | `sl` | `sv` | `tr` | `zh_CN` | `zh_TW`.
35+
- `mac_prefix` (String) Prefix for autogenerated MAC addresses.
36+
- `max_workers` (Number) Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.
37+
- `migration_cidr` (String) Cluster wide migration network CIDR.
38+
- `migration_type` (String) Cluster wide migration type. Must be `secure` | `insecure` (default is `secure`).
39+
- `next_id` (Attributes) The ranges for the next free VM ID auto-selection pool. (see [below for nested schema](#nestedatt--next_id))
40+
- `notify` (Attributes) Cluster-wide notification settings. (see [below for nested schema](#nestedatt--notify))
41+
42+
### Read-Only
43+
44+
- `id` (String) The unique identifier of this resource.
45+
46+
<a id="nestedatt--next_id"></a>
47+
### Nested Schema for `next_id`
48+
49+
Optional:
50+
51+
- `lower` (Number) The minimum number for the next free VM ID. Must be higher or equal to 100
52+
- `upper` (Number) The maximum number for the next free VM ID. Must be less or equal to 999999999
53+
54+
55+
<a id="nestedatt--notify"></a>
56+
### Nested Schema for `notify`
57+
58+
Optional:
59+
60+
- `ha_fencing_mode` (String) Cluster-wide notification settings for the HA fencing mode. Must be `always` | `never`.
61+
- `ha_fencing_target` (String) Cluster-wide notification settings for the HA fencing target.
62+
- `package_updates` (String) Cluster-wide notification settings for package updates. Must be `auto` | `always` | `never`.
63+
- `package_updates_target` (String) Cluster-wide notification settings for the package updates target.
64+
- `replication` (String) Cluster-wide notification settings for replication. Must be `always` | `never`.
65+
- `replication_target` (String) Cluster-wide notification settings for the replication target.

docs/resources/metrics_server.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
layout: page
3+
title: proxmox_metrics_server
4+
parent: Resources
5+
subcategory: Virtual Environment
6+
description: |-
7+
Manages PVE metrics server.
8+
---
9+
10+
# Resource: proxmox_metrics_server
11+
12+
Manages PVE metrics server.
13+
14+
15+
16+
<!-- schema generated by tfplugindocs -->
17+
## Schema
18+
19+
### Required
20+
21+
- `name` (String) Unique name that will be ID of this metric server in PVE.
22+
- `port` (Number) Server network port.
23+
- `server` (String) Server dns name or IP address.
24+
- `type` (String) Plugin type. Choice is between `graphite` | `influxdb` | `opentelemetry`.
25+
26+
### Optional
27+
28+
- `disable` (Boolean) Set this to `true` to disable this metric server.
29+
- `graphite_path` (String) Root graphite path (ex: `proxmox.mycluster.mykey`).
30+
- `graphite_proto` (String) Protocol to send graphite data. Choice is between `udp` | `tcp`. If not set, PVE default is `udp`.
31+
- `influx_api_path_prefix` (String) An API path prefix inserted between `<host>:<port>/` and `/api2/`. Can be useful if the InfluxDB service runs behind a reverse proxy.
32+
- `influx_bucket` (String) The InfluxDB bucket/db. Only necessary when using the http v2 api.
33+
- `influx_db_proto` (String) Protocol for InfluxDB. Choice is between `udp` | `http` | `https`. If not set, PVE default is `udp`.
34+
- `influx_max_body_size` (Number) InfluxDB max-body-size in bytes. Requests are batched up to this size. If not set, PVE default is `25000000`.
35+
- `influx_organization` (String) The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.
36+
- `influx_token` (String, Sensitive) The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use `user:password` instead.
37+
- `influx_verify` (Boolean) Set to `false` to disable certificate verification for https endpoints.
38+
- `mtu` (Number) MTU (maximum transmission unit) for metrics transmission over UDP. If not set, PVE default is `1500` (allowed `512` - `65536`).
39+
- `opentelemetry_compression` (String) OpenTelemetry compression algorithm for requests. Choice is between `none` | `gzip`. If not set, PVE default is `gzip`.
40+
- `opentelemetry_headers` (String, Sensitive) OpenTelemetry custom HTTP headers as JSON, base64 encoded.
41+
- `opentelemetry_max_body_size` (Number) OpenTelemetry maximum request body size in bytes. If not set, PVE default is `10000000`.
42+
- `opentelemetry_path` (String) OpenTelemetry endpoint path (e.g., `/v1/metrics`).
43+
- `opentelemetry_proto` (String) Protocol for OpenTelemetry. Choice is between `http` | `https`. If not set, PVE default is `https`.
44+
- `opentelemetry_resource_attributes` (String) OpenTelemetry additional resource attributes as JSON, base64 encoded.
45+
- `opentelemetry_timeout` (Number) OpenTelemetry HTTP request timeout in seconds. If not set, PVE default is `5`.
46+
- `opentelemetry_verify_ssl` (Boolean) OpenTelemetry verify SSL certificates. If not set, PVE default is `true`.
47+
- `timeout` (Number) TCP socket timeout in seconds. If not set, PVE default is `1`.
48+
49+
### Read-Only
50+
51+
- `id` (String) The unique identifier of this resource.

docs/resources/replication.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: page
3+
title: proxmox_replication
4+
parent: Resources
5+
subcategory: Virtual Environment
6+
description: |-
7+
Manages Proxmox VE Replication.
8+
---
9+
10+
# Resource: proxmox_replication
11+
12+
Manages Proxmox VE Replication.
13+
14+
15+
16+
<!-- schema generated by tfplugindocs -->
17+
## Schema
18+
19+
### Required
20+
21+
- `id` (String) Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '<GUEST>-<JOBNUM>'.
22+
- `target` (String) Target node.
23+
- `type` (String) Section type.
24+
25+
### Optional
26+
27+
- `comment` (String) Description.
28+
- `disable` (Boolean) Flag to disable/deactivate this replication.
29+
- `rate` (Number) Rate limit in mbps (megabytes per second) as floating point number.
30+
- `schedule` (String) Storage replication schedule. The format is a subset of `systemd` calendar events. Defaults to */15
31+
32+
### Read-Only
33+
34+
- `guest` (Number) Guest ID.
35+
- `jobnum` (Number) Unique, sequential ID assigned to each job.
36+
- `source` (String) For internal use, to detect if the guest was stolen.

docs/resources/virtual_environment_cluster_options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
# Resource: proxmox_virtual_environment_cluster_options
1111

12+
~> **Deprecated:** Use [`proxmox_cluster_options`](cluster_options.md) instead. This resource will be removed in v1.0.
13+
1214
Manages Proxmox VE Cluster Datacenter options.
1315

1416
## Example Usage

0 commit comments

Comments
 (0)