Skip to content

Commit

Permalink
Format inline HCL codes in docs
Browse files Browse the repository at this point in the history
Signed-off-by: imjoey <[email protected]>
  • Loading branch information
imjoey committed Jul 14, 2019
1 parent b78f491 commit 7e588ad
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 64 deletions.
14 changes: 7 additions & 7 deletions website/docs/d/clusters.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The oVirt Clusters data source allows access to details of list of clusters with

```hcl
data "ovirt_clusters" "filtered_clusters" {
name_regex = "^default*"
search = {
criteria = "architecture = x86_64 and Storage.name = data"
max = 2
case_sensitive = false
}
name_regex = "^default*"
search = {
criteria = "architecture = x86_64 and Storage.name = data"
max = 2
case_sensitive = false
}
}
```

Expand Down
14 changes: 7 additions & 7 deletions website/docs/d/datacenters.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The oVirt Datacenters data source allows access to details of list of datacenter

```hcl
data "ovirt_datacenters" "filtered_datacenters" {
name_regex = "^default*"
search = {
criteria = "status = up and Storage.name = data"
max = 2
case_sensitive = false
}
name_regex = "^default*"
search = {
criteria = "status = up and Storage.name = data"
max = 2
case_sensitive = false
}
}
```

Expand Down
12 changes: 6 additions & 6 deletions website/docs/d/disks.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The oVirt Disks data source allows access to details of list of disks within oVi

```hcl
data "ovirt_disks" "filtered_disks" {
name_regex = "^test_disk*"
name_regex = "^test_disk*"
search = {
criteria = "name = test_disk1 and provisioned_size > 1024000000"
max = 2
case_sensitive = false
}
search = {
criteria = "name = test_disk1 and provisioned_size > 1024000000"
max = 2
case_sensitive = false
}
}
```

Expand Down
14 changes: 7 additions & 7 deletions website/docs/d/networks.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The oVirt Networks data source allows access to details of list of networks with

```hcl
data "ovirt_networks" "filtered_networks" {
name_regex = "^ovirtmgmt-t*"
search = {
criteria = "datacenter = Default and name = ovirtmgmt-test"
max = 2
case_sensitive = false
}
name_regex = "^ovirtmgmt-t*"
search = {
criteria = "datacenter = Default and name = ovirtmgmt-test"
max = 2
case_sensitive = false
}
}
```

Expand Down
12 changes: 6 additions & 6 deletions website/docs/d/storagedomains.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The oVirt Storagedomains data source allows access to details of list of storage

```hcl
data "ovirt_storagedomains" "filtered_storagedomains" {
name_regex = "^MAIN_dat.*|^DEV_dat.*"
name_regex = "^MAIN_dat.*|^DEV_dat.*"
search = {
criteria = "status != unattached and name = DS_INTERNAL and datacenter = MY_DC"
max = 2
case_sensitive = false
}
search = {
criteria = "status != unattached and name = DS_INTERNAL and datacenter = MY_DC"
max = 2
case_sensitive = false
}
}
```

Expand Down
4 changes: 2 additions & 2 deletions website/docs/d/vnic_profiles.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ The oVirt vNIC profiles data source allows access to details of list of vNIC pro

```hcl
data "ovirt_vnic_profiles" "filtered_vnic_profiles" {
name_regex = ".*mirror$"
network_id = "649f2d61-7f23-477b-93bd-d55f974d8bc8"
name_regex = ".*mirror$"
network_id = "649f2d61-7f23-477b-93bd-d55f974d8bc8"
}
```

Expand Down
8 changes: 4 additions & 4 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ provider "ovirt" {
url = "https://engine-api/ovirt-engine/api"
username = "admin@internal"
password = "thepassword"
headers {
filter = true
all_content = true
headers {
filter = true
all_content = true
}
}
# Create a VM
resource "ovirt_vm" "test-vm" {
# ...
# ...
}
```

Expand Down
50 changes: 25 additions & 25 deletions website/docs/r/vm.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Manages a VM resource within oVirt.

```hcl
resource "ovirt_vm" "vm" {
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096
# there has one or more disks in the specified template
template_id = "5ba458ca-00a4-0358-00cb-000000000223"
}
Expand All @@ -28,9 +28,9 @@ resource "ovirt_vm" "vm" {

```hcl
resource "ovirt_vm" "vm" {
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
block_device {
disk_id = "${ovirt_disk.boot_disk_1.id}"
Expand All @@ -42,7 +42,7 @@ resource "ovirt_vm" "vm" {
resource "ovirt_disk" "boot_disk_1" {
name = "boot_disk_1"
alias = "boot_disk_1"
size = 60 # in gigabytes
size = 60 # in gigabytes
format = "cow"
storage_domain_id = "5ba458ca-00a4-0358-00cb-000000000223"
sparse = true
Expand All @@ -53,9 +53,9 @@ resource "ovirt_disk" "boot_disk_1" {

```hcl
resource "ovirt_vm" "vm" {
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
block_device {
disk_id = "${data.boot_disk.disks.0.id}"
Expand All @@ -65,25 +65,25 @@ resource "ovirt_vm" "vm" {
}
data "ovirt_disks" "boot_disk" {
name_regex = "boot_disk_1"
name_regex = "boot_disk_1"
}
```

### Attach a New Disks to VM

```hcl
resource "ovirt_vm" "vm" {
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
# there has one or more disks in the specified template
template_id = "5ba458ca-00a4-0358-00cb-000000000223"
}
resource "ovirt_disk" "attached_disk_1" {
name = "attached_disk_1"
alias = "attached_disk_1"
size = 60 # in gigabytes
size = 60 # in gigabytes
format = "cow"
storage_domain_id = "5ba458ca-00a4-0358-00cb-000000000223"
sparse = true
Expand All @@ -103,9 +103,9 @@ resource "ovirt_disk_attachment" "attachment" {

```hcl
resource "ovirt_vm" "vm" {
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
name = "my_vm"
cluster_id = "3e7e71ed-24ea-4812-8ef9-a09a858d31e4"
memory = 4096 # in megabytes
# there has one or more disks in the specified template
template_id = "5ba458ca-00a4-0358-00cb-000000000223"
}
Expand All @@ -130,16 +130,16 @@ resource "ovirt_vm" "my_vm_1" {
name = "my_vm_1"
cluster_id = "b0280bd4-4152-42ad-aa37-1e73ab30b0da"
template_id = "5ba458ca-00a4-0358-00cb-000000000223"
memory = 4096 # in megabytes
memory = 4096 # in megabytes
initialization {
authorized_ssh_key = "${file(pathexpand("~/.ssh/id_rsa.pub"))}"
host_name = "vm-basic-updated"
timezone = "Asia/Shanghai"
user_name = "root"
custom_script = "echo hello2"
dns_search = "university.edu"
dns_servers = "8.8.8.8"
host_name = "vm-basic-updated"
timezone = "Asia/Shanghai"
user_name = "root"
custom_script = "echo hello2"
dns_search = "university.edu"
dns_servers = "8.8.8.8"
nic_configuration {
label = "eth0"
Expand Down

0 comments on commit 7e588ad

Please sign in to comment.