Skip to content

Commit 4c2e9b5

Browse files
authored
Autogenerate vm resource docs (#285)
* Autogenerate vm resource docs with tfplugindocs * Attempt at fixing bash command rendering * Another attempt at fixing bash command rendering * More fixes
1 parent 78b55ab commit 4c2e9b5

File tree

5 files changed

+282
-112
lines changed

5 files changed

+282
-112
lines changed

docs/data-sources/vms.md

+88-27
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
# xenorchestra_vms
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "xenorchestra_vms Data Source - terraform-provider-xenorchestra"
4+
subcategory: ""
5+
description: |-
6+
Use this data source to filter Xenorchestra VMs by certain criteria (poolid, powerstate or host) for use in other resources.
7+
---
8+
9+
# xenorchestra_vms (Data Source)
210

311
Use this data source to filter Xenorchestra VMs by certain criteria (pool_id, power_state or host) for use in other resources.
412

513
## Example Usage
614

7-
```hcl
15+
```terraform
816
data "xenorchestra_pool" "pool" {
917
name_label = "Your pool"
1018
}
@@ -25,28 +33,81 @@ output "vms_length" {
2533
}
2634
```
2735

28-
## Argument Reference
29-
30-
* pool_id - (Required) The ID of the pool the vms belong to.
31-
* host - (Optional) The ID of the host (container) the vms belong to.
32-
* power_state - (Optional) The power state of the vms. ("Running" / "Halted")
33-
34-
## Attributes Reference
35-
36-
* id - The CRC-32 checksum based on arguments passed to this data source.
37-
* pool_id - The ID of the pool the VM belongs to.
38-
* vms - A list of information for all vms found in this pool.
39-
* vms.id - The uuid for the VM.
40-
* vms.name_label - The name label for the VM.
41-
* vms.cpu - The number of cpu's for the VM.
42-
* vms.cloud_config - The cloud configuration for the VM.
43-
* vms.cloud_network_config - The cloud network configuration for the VM.
44-
* vms.tags - The tags applied to the VM.
45-
* vms.memory_max - The maximum memory size for the VM.
46-
* vms.affinity_host - The affinity host for the VM.
47-
* vms.template - The template used to create the VM.
48-
* vms.wait_for_ip - The wait for ip option for the VM.
49-
* vms.high_availability - The high availability option for the VM.
50-
* vms.resource_set - The resource set for the VM.
51-
* vms.ipv4_addresses - A list of ipv4 addresses for the VM.
52-
* vms.ipv6_addresses - A list of ipv6 addresses for the VM.
36+
<!-- schema generated by tfplugindocs -->
37+
## Schema
38+
39+
### Required
40+
41+
- `pool_id` (String) The ID of the pool the VM belongs to.
42+
43+
### Optional
44+
45+
- `host` (String)
46+
- `power_state` (String) The power state of the vms. (Running, Halted)
47+
48+
### Read-Only
49+
50+
- `id` (String) The ID of this resource.
51+
- `vms` (List of Object) A list of information for all vms found in this pool. (see [below for nested schema](#nestedatt--vms))
52+
53+
<a id="nestedatt--vms"></a>
54+
### Nested Schema for `vms`
55+
56+
Read-Only:
57+
58+
- `affinity_host` (String)
59+
- `auto_poweron` (Boolean)
60+
- `blocked_operations` (Set of String)
61+
- `cloud_config` (String)
62+
- `cloud_network_config` (String)
63+
- `core_os` (Boolean)
64+
- `cpu_cap` (Number)
65+
- `cpu_weight` (Number)
66+
- `cpus` (Number)
67+
- `disk` (List of Object) (see [below for nested schema](#nestedobjatt--vms--disk))
68+
- `exp_nested_hvm` (Boolean)
69+
- `high_availability` (String)
70+
- `host` (String)
71+
- `hvm_boot_firmware` (String)
72+
- `id` (String)
73+
- `ipv4_addresses` (List of String)
74+
- `ipv6_addresses` (List of String)
75+
- `memory_max` (Number)
76+
- `name_description` (String)
77+
- `name_label` (String)
78+
- `network` (List of Object) (see [below for nested schema](#nestedobjatt--vms--network))
79+
- `power_state` (String)
80+
- `resource_set` (String)
81+
- `start_delay` (Number)
82+
- `tags` (Set of String)
83+
- `template` (String)
84+
- `vga` (String)
85+
- `videoram` (Number)
86+
- `wait_for_ip` (Boolean)
87+
88+
<a id="nestedobjatt--vms--disk"></a>
89+
### Nested Schema for `vms.disk`
90+
91+
Read-Only:
92+
93+
- `attached` (Boolean)
94+
- `name_description` (String)
95+
- `name_label` (String)
96+
- `position` (String)
97+
- `size` (Number)
98+
- `sr_id` (String)
99+
- `vbd_id` (String)
100+
- `vdi_id` (String)
101+
102+
103+
<a id="nestedobjatt--vms--network"></a>
104+
### Nested Schema for `vms.network`
105+
106+
Read-Only:
107+
108+
- `attached` (Boolean)
109+
- `device` (String)
110+
- `ipv4_addresses` (List of String)
111+
- `ipv6_addresses` (List of String)
112+
- `mac_address` (String)
113+
- `network_id` (String)

docs/index.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ provider "xenorchestra" {
4646
<!-- schema generated by tfplugindocs -->
4747
## Schema
4848

49+
### Required
50+
51+
- `password` (String) Password for xoa api. Can be set via the XOA_PASSWORD environment variable.
52+
- `url` (String) Hostname of the xoa router. Can be set via the XOA_URL environment variable.
53+
- `username` (String) User account for xoa api. Can be set via the XOA_USER environment variable.
54+
4955
### Optional
5056

5157
- `insecure` (Boolean) Whether SSL should be verified or not. Can be set via the XOA_INSECURE environment variable.
52-
- `password` (String) Password for xoa api. Can be set via the XOA_PASSWORD environment variable.
5358
- `retry_max_time` (String) If `retry_mode` is set, this specifies the duration for which the backoff method will continue retries. Can be set via the `XOA_RETRY_MAX_TIME` environment variable
5459
- `retry_mode` (String) Specifies if retries should be attempted for requests that require eventual . Can be set via the XOA_RETRY_MODE environment variable.
55-
- `url` (String) Hostname of the xoa router. Can be set via the XOA_URL environment variable.
56-
- `username` (String) User account for xoa api. Can be set via the XOA_USER environment variable.

0 commit comments

Comments
 (0)