Skip to content

Commit efa7e13

Browse files
committed
Update docs
Regenerate documentation
1 parent 9202cd0 commit efa7e13

File tree

5 files changed

+285
-0
lines changed

5 files changed

+285
-0
lines changed

docs/resources/iso.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "hypercore_iso Resource - hypercore"
4+
subcategory: ""
5+
description: |-
6+
Hypercore ISO resource to manage ISO images. To use this resource, it's recommended to set the environment variable TF_CLI_ARGS_apply="-parallelism=1" or pass the -parallelism parameter to the terraform apply.
7+
---
8+
9+
# hypercore_iso (Resource)
10+
11+
Hypercore ISO resource to manage ISO images. <br><br>To use this resource, it's recommended to set the environment variable `TF_CLI_ARGS_apply="-parallelism=1"` or pass the `-parallelism` parameter to the `terraform apply`.
12+
13+
## Example Usage
14+
15+
```terraform
16+
locals {
17+
vm_name = "myvm"
18+
}
19+
20+
data "hypercore_vm" "isovm" {
21+
name = local.vm_name
22+
}
23+
24+
resource "hypercore_iso" "iso_upload_local" {
25+
name = "testiso-local.iso"
26+
source_url = "file:////home/bla/Downloads/mytestiso.iso"
27+
}
28+
29+
resource "hypercore_iso" "iso_upload_from_url" {
30+
name = "testiso-remote.iso"
31+
source_url = "https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-virt-3.21.3-aarch64.iso"
32+
}
33+
34+
35+
output "uploaded_iso_LOCAL" {
36+
value = hypercore_iso.iso_upload_local
37+
}
38+
39+
output "uploaded_iso_EXTERNAL" {
40+
value = hypercore_iso.iso_upload_from_url
41+
}
42+
```
43+
44+
<!-- schema generated by tfplugindocs -->
45+
## Schema
46+
47+
### Required
48+
49+
- `name` (String) Desired name of the ISO to upload. ISO name must end with '.iso'.
50+
51+
### Optional
52+
53+
- `source_url` (String) Source URL from where to fetch that disk from. URL can start with: `http://`, `https://`, `file:///`
54+
55+
### Read-Only
56+
57+
- `id` (String) ISO identifier

docs/resources/vm_snapshot.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "hypercore_vm_snapshot Resource - hypercore"
4+
subcategory: ""
5+
description: |-
6+
Hypercore VM snapshot resource to manage VM snapshots
7+
---
8+
9+
# hypercore_vm_snapshot (Resource)
10+
11+
Hypercore VM snapshot resource to manage VM snapshots
12+
13+
## Example Usage
14+
15+
```terraform
16+
locals {
17+
vm_name = "example-vm-one"
18+
another_vm_name = "example-vm-two"
19+
}
20+
21+
data "hypercore_vm" "example-vm-one" {
22+
name = local.vm_name
23+
}
24+
25+
data "hypercore_vm" "example-vm-two" {
26+
name = local.another_vm_name
27+
}
28+
29+
resource "hypercore_vm_snapshot" "snapshot" {
30+
vm_uuid = data.hypercore_vm.example-vm-one.vms.0.uuid
31+
label = "my-snapshot"
32+
}
33+
34+
resource "hypercore_vm_snapshot" "imported-snapshot" {
35+
vm_uuid = data.hypercore_vm.example-vm-two.vms.0.uuid
36+
}
37+
38+
import {
39+
to = hypercore_vm_snapshot.imported-snapshot
40+
id = "24ab2255-ca77-49ec-bc96-f469cec3affb"
41+
}
42+
```
43+
44+
<!-- schema generated by tfplugindocs -->
45+
## Schema
46+
47+
### Required
48+
49+
- `vm_uuid` (String) VM UUID of which we want to create a snapshot.
50+
51+
### Optional
52+
53+
- `label` (String) Snapshot label.
54+
55+
### Read-Only
56+
57+
- `id` (String) VM snapshot identifier
58+
- `type` (String) Snapshot type. Can be: USER, AUTOMATED, SUPPORT
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "hypercore_vm_snapshot_schedule Resource - hypercore"
4+
subcategory: ""
5+
description: |-
6+
Hypercore VM snapshot resource to manage VM snapshots
7+
---
8+
9+
# hypercore_vm_snapshot_schedule (Resource)
10+
11+
Hypercore VM snapshot resource to manage VM snapshots
12+
13+
## Example Usage
14+
15+
```terraform
16+
locals {
17+
vm_name = "example-vm-one"
18+
another_vm_name = "example-vm-two"
19+
}
20+
21+
data "hypercore_vm" "example-vm-one" {
22+
name = local.vm_name
23+
}
24+
25+
data "hypercore_vm" "example-vm-two" {
26+
name = local.another_vm_name
27+
}
28+
29+
resource "hypercore_vm_snapshot_schedule" "example-schedule" {
30+
name = "my-schedule"
31+
rules = [
32+
{
33+
name = "first-example-rule",
34+
start_timestamp = "2023-02-01 00:00:00",
35+
frequency = "FREQ=MINUTELY;INTERVAL=1",
36+
local_retention_seconds = 300
37+
},
38+
{
39+
name = "second-example-rule",
40+
start_timestamp = "2023-02-01 00:00:00",
41+
frequency = "FREQ=MINUTELY;INTERVAL=1",
42+
local_retention_seconds = 300
43+
}
44+
]
45+
}
46+
47+
resource "hypercore_vm_snapshot_schedule" "example-schedule-no-rules" {
48+
name = "my-schedule-without-rules"
49+
}
50+
51+
resource "hypercore_vm_snapshot_schedule" "example-schedule-imported" {
52+
name = "my-imported-schedule"
53+
54+
# apply imported schedule to VMs
55+
vm_uuid_list = [
56+
data.hypercore_vm.example-vm-one.vms.0.uuid,
57+
data.hypercore_vm.example-vm-two.vms.0.uuid,
58+
]
59+
}
60+
61+
import {
62+
to = hypercore_vm_snapshot_schedule.testtf-schedule-imported
63+
id = "69b21f14-6bb6-4dd5-a6bc-6dec9bd59c96"
64+
}
65+
```
66+
67+
<!-- schema generated by tfplugindocs -->
68+
## Schema
69+
70+
### Required
71+
72+
- `name` (String) Snapshot schedule name.
73+
74+
### Optional
75+
76+
- `rules` (Attributes List) Scheduled snapshot rules. (see [below for nested schema](#nestedatt--rules))
77+
- `vm_uuid_list` (Set of String) List of VM UUIDs to which to apply the schedule
78+
79+
### Read-Only
80+
81+
- `id` (String) Snapshot schedule identifier
82+
83+
<a id="nestedatt--rules"></a>
84+
### Nested Schema for `rules`
85+
86+
Required:
87+
88+
- `frequency` (String) Frequency based on RFC-2445 (FREQ=MINUTELY;INTERVAL=5)
89+
- `local_retention_seconds` (Number) Number of seconds before snapshots are removed
90+
- `name` (String) Rule name
91+
- `start_timestamp` (String) Local timezone timestamp (2010-01-01 00:00:00) of when a snapshot is to be taken
92+
93+
Optional:
94+
95+
- `remote_retention_seconds` (Number) Number of seconds before snapshots are removed. If not set, it'll be the same as `local_retention_seconds`
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
locals {
2+
vm_name = "example-vm-one"
3+
another_vm_name = "example-vm-two"
4+
}
5+
6+
data "hypercore_vm" "example-vm-one" {
7+
name = local.vm_name
8+
}
9+
10+
data "hypercore_vm" "example-vm-two" {
11+
name = local.another_vm_name
12+
}
13+
14+
resource "hypercore_vm_snapshot" "snapshot" {
15+
vm_uuid = data.hypercore_vm.example-vm-one.vms.0.uuid
16+
label = "my-snapshot"
17+
}
18+
19+
resource "hypercore_vm_snapshot" "imported-snapshot" {
20+
vm_uuid = data.hypercore_vm.example-vm-two.vms.0.uuid
21+
}
22+
23+
import {
24+
to = hypercore_vm_snapshot.imported-snapshot
25+
id = "24ab2255-ca77-49ec-bc96-f469cec3affb"
26+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
locals {
2+
vm_name = "example-vm-one"
3+
another_vm_name = "example-vm-two"
4+
}
5+
6+
data "hypercore_vm" "example-vm-one" {
7+
name = local.vm_name
8+
}
9+
10+
data "hypercore_vm" "example-vm-two" {
11+
name = local.another_vm_name
12+
}
13+
14+
resource "hypercore_vm_snapshot_schedule" "example-schedule" {
15+
name = "my-schedule"
16+
rules = [
17+
{
18+
name = "first-example-rule",
19+
start_timestamp = "2023-02-01 00:00:00",
20+
frequency = "FREQ=MINUTELY;INTERVAL=1",
21+
local_retention_seconds = 300
22+
},
23+
{
24+
name = "second-example-rule",
25+
start_timestamp = "2023-02-01 00:00:00",
26+
frequency = "FREQ=MINUTELY;INTERVAL=1",
27+
local_retention_seconds = 300
28+
}
29+
]
30+
}
31+
32+
resource "hypercore_vm_snapshot_schedule" "example-schedule-no-rules" {
33+
name = "my-schedule-without-rules"
34+
}
35+
36+
resource "hypercore_vm_snapshot_schedule" "example-schedule-imported" {
37+
name = "my-imported-schedule"
38+
39+
# apply imported schedule to VMs
40+
vm_uuid_list = [
41+
data.hypercore_vm.example-vm-one.vms.0.uuid,
42+
data.hypercore_vm.example-vm-two.vms.0.uuid,
43+
]
44+
}
45+
46+
import {
47+
to = hypercore_vm_snapshot_schedule.testtf-schedule-imported
48+
id = "69b21f14-6bb6-4dd5-a6bc-6dec9bd59c96"
49+
}

0 commit comments

Comments
 (0)