Skip to content

Commit a72f6cd

Browse files
committed
linter and docs
1 parent d4f53c3 commit a72f6cd

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

docs/resources/vm.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ resource "hypercore_vm" "myvm" {
4545
}
4646
}
4747
48+
resource "hypercore_vm" "import-from-smb" {
49+
group = "my-group"
50+
name = "imported-vm"
51+
description = "some description"
52+
53+
vcpu = 4
54+
memory = 4096 # MiB
55+
56+
import = {
57+
server = "10.5.11.39"
58+
username = ";administrator"
59+
password = "***"
60+
path = "/cidata"
61+
file_name = "example-template.xml"
62+
}
63+
}
64+
4865
output "vm_uuid" {
4966
value = hypercore_vm.myvm.id
5067
}
@@ -63,7 +80,7 @@ output "vm_uuid" {
6380
- `clone` (Object) Clone options if the VM is being created as a clone. The `source_vm_uuid` is the UUID of the VM used for cloning, <br>`user_data` and `meta_data` are used for the cloud init data. (see [below for nested schema](#nestedatt--clone))
6481
- `description` (String) Description of this VM
6582
- `group` (String) Group/tag to create this VM in
66-
- `import` (Object) Options for importing a VM through a SMB server or some other HTTP location. <br>Use server, username, password for SMB or http_uri for some other HTTP location. Parameters path and file_name are always **required** (see [below for nested schema](#nestedatt--import))
83+
- `import` (Attributes) Options for importing a VM through a SMB server or some other HTTP location. <br>Use server, username, password for SMB or http_uri for some other HTTP location. Parameters path and file_name are always **required** (see [below for nested schema](#nestedatt--import))
6784
- `memory` (Number) Memory (RAM) size in `MiB`: If the cloned VM was already created <br>and it's memory was modified, the cloned VM will be rebooted (either gracefully or forcefully)
6885
- `snapshot_schedule_uuid` (String) UUID of the snapshot schedule to create automatic snapshots
6986
- `vcpu` (Number) Number of CPUs on this VM. If the cloned VM was already created and it's <br>`VCPU` was modified, the cloned VM will be rebooted (either gracefully or forcefully)
@@ -95,11 +112,14 @@ Optional:
95112
<a id="nestedatt--import"></a>
96113
### Nested Schema for `import`
97114

98-
Optional:
115+
Required:
99116

100117
- `file_name` (String)
101-
- `http_uri` (String)
102-
- `password` (String)
103118
- `path` (String)
119+
120+
Optional:
121+
122+
- `http_uri` (String)
123+
- `password` (String, Sensitive)
104124
- `server` (String)
105125
- `username` (String)

examples/resources/hypercore_vm/resource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ resource "hypercore_vm" "import-from-smb" {
3535
name = "imported-vm"
3636
description = "some description"
3737

38-
vcpu = 4
38+
vcpu = 4
3939
memory = 4096 # MiB
4040

4141
import = {

0 commit comments

Comments
 (0)