Skip to content

Commit

Permalink
Examples for ovirt_blank_template
Browse files Browse the repository at this point in the history
  • Loading branch information
Janos Bonic committed May 24, 2022
1 parent 46fc5fe commit ae7a948
Show file tree
Hide file tree
Showing 22 changed files with 88 additions and 22 deletions.
5 changes: 4 additions & 1 deletion docs/resources/disk_attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The ovirt_disk_attachment resource attaches a single disk to a single VM. For co
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_disk" "test" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -28,7 +31,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_disk_attachment" "test" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/disk_attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ The ovirt_disk_attachments resource attaches multiple disks to a single VM in on
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_disk" "test" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -28,7 +31,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_disk_attachments" "test" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/nic.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ The ovirt_nic resource creates network interfaces in oVirt.
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_nic" "test" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The ovirt_tag resource creates tags for virtual machines to use.
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_tag" "test" {
name = random_string.tag_name.result
}
Expand All @@ -21,7 +24,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_vm_tag" "test" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ The ovirt_template resource manages templates for virtual machines in oVirt.
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_template" "blueprint" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ The ovirt_vm resource creates a virtual machine in oVirt.
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
```

Expand Down
5 changes: 4 additions & 1 deletion docs/resources/vm_graphics_consoles.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ The ovirt_vm_graphics_consoles controls all the graphic consoles of a VM.
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_vm" "test" {
name = "hello_world"
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
# This will remove all graphics consoles from the specified VM. Adding graphics consoles is currently not supported.
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/vm_optimize_cpu_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ The ovirt_vm_optimize_cpu_settings sets the CPU settings to automatically optimi
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_vm" "test" {
name = "hello_world"
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_vm_optimize_cpu_settings" "test" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/vm_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The ovirt_vm_start resource starts a VM in oVirt when created and stops the VM w
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_disk" "test" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -24,7 +27,7 @@ resource "ovirt_disk" "test" {
resource "ovirt_vm" "test" {
name = random_string.vm_name.result
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_disk_attachment" "test" {
Expand Down
5 changes: 4 additions & 1 deletion docs/resources/vm_tag.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The ovirt_vm_tag resource attaches a tag to a virtual machine.
## Example Usage

```terraform
data "ovirt_blank_template" "blank" {
}
resource "ovirt_tag" "test" {
name = random_string.tag_name.result
}
Expand All @@ -21,7 +24,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
resource "ovirt_vm_tag" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/data-sources/ovirt_disk_attachments/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_disk" "test1" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -16,7 +19,7 @@ resource "ovirt_disk" "test2" {

resource "ovirt_vm" "test" {
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
name = "test"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_disk" "test1" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -16,7 +19,7 @@ resource "ovirt_disk" "test2" {

resource "ovirt_vm" "test" {
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
name = "test"
}

Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_disk_attachment/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_disk" "test" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -10,7 +13,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_disk_attachment" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_disk_attachments/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_disk" "test" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -10,7 +13,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_disk_attachments" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_nic/resource.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_nic" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_tag/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_tag" "test" {
name = random_string.tag_name.result
}
Expand All @@ -6,7 +9,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_vm_tag" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_template/resource.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_template" "blueprint" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_vm/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}
5 changes: 4 additions & 1 deletion examples/resources/ovirt_vm_graphics_consoles/resource.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_vm" "test" {
name = "hello_world"
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

# This will remove all graphics consoles from the specified VM. Adding graphics consoles is currently not supported.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_vm" "test" {
name = "hello_world"
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_vm_optimize_cpu_settings" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_vm_start/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_disk" "test" {
storagedomain_id = var.storagedomain_id
format = "raw"
Expand All @@ -9,7 +12,7 @@ resource "ovirt_disk" "test" {
resource "ovirt_vm" "test" {
name = random_string.vm_name.result
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_disk_attachment" "test" {
Expand Down
5 changes: 4 additions & 1 deletion examples/resources/ovirt_vm_tag/resource.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data "ovirt_blank_template" "blank" {
}

resource "ovirt_tag" "test" {
name = random_string.tag_name.result
}
Expand All @@ -6,7 +9,7 @@ resource "ovirt_vm" "test" {
name = random_string.vm_name.result
comment = "Hello world!"
cluster_id = var.cluster_id
template_id = "00000000-0000-0000-0000-000000000000"
template_id = data.ovirt_blank_template.blank.id
}

resource "ovirt_vm_tag" "test" {
Expand Down

0 comments on commit ae7a948

Please sign in to comment.