Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pbesret committed Nov 7, 2023
1 parent 3053c2d commit e954aa7
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 10 deletions.
107 changes: 107 additions & 0 deletions docs/resources/compute_virtual_controller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cloudtemple_compute_virtual_controller Resource - terraform-provider-cloudtemple"
subcategory: "Compute"
description: |-
Create and manage virtual controllers of a virtual machine.
To manage this resource you will need the following roles:
- compute_write
- compute_read
- activity_read
---

# cloudtemple_compute_virtual_controller (Resource)

Create and manage virtual controllers of a virtual machine.

To manage this resource you will need the following roles:
- `compute_write`
- `compute_read`
- `activity_read`

## Example Usage

```terraform
data "cloudtemple_compute_machine_manager" "vstack01" {
name = "vc-vstack-001-t0001"
}
data "cloudtemple_compute_virtual_datacenter" "th3s" {
name = "DC-TH3S"
machine_manager_id = data.cloudtemple_compute_machine_manager.vstack01.id
}
data "cloudtemple_compute_host_cluster" "clu001" {
name = "clu001-ucs12"
datacenter_id = data.cloudtemple_compute_virtual_datacenter.th3s.id
}
data "cloudtemple_compute_datastore_cluster" "sdrs001" {
name = "sdrs001-LIVE_"
datacenter_id = data.cloudtemple_compute_virtual_datacenter.th3s.id
}
data "cloudtemple_compute_content_library" "cl001" {
name = "local-vc-vstack-001-t0001"
}
data "cloudtemple_compute_content_library_item" "ubuntu-cloudinit" {
content_library_id = data.cloudtemple_compute_content_library.cl001.id
name = "ubuntu-22.04.1-desktop-amd64"
}
resource "cloudtemple_compute_virtual_machine" "foo" {
name = "test-terraform-example-controller"
power_state = "on"
memory = 8 * 1024 * 1024 * 1024
cpu = 4
num_cores_per_socket = 1
datacenter_id = data.cloudtemple_compute_virtual_datacenter.th3s.id
host_cluster_id = data.cloudtemple_compute_host_cluster.clu001.id
datastore_cluster_id = data.cloudtemple_compute_datastore_cluster.sdrs001.id
guest_operating_system_moref = "ubuntu64Guest"
}
resource "cloudtemple_compute_virtual_controller" "bar" {
virtual_machine_id = cloudtemple_compute_virtual_machine.foo.id
type = "CD/DVD"
content_library_item_id = data.cloudtemple_compute_content_library_item.ubuntu-cloudinit.id
connected = true
mounted = true
}
resource "cloudtemple_compute_virtual_controller" "baz" {
virtual_machine_id = cloudtemple_compute_virtual_machine.pbt-crashtest.id
type = "SCSI"
sub_type = "ParaVirtual"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `type` (String) Can be one of : USB2, USB3, SCSI, CD/DVD
- `virtual_machine_id` (String)

### Optional

- `connected` (Boolean) Only compatible with CDROM controllers
- `content_library_item_id` (String) Content library item identifier. (Conflicts with `iso_path`)
- `iso_path` (String) If exists, the datastore ISO path. (Conflicts with `content_library_item_id`)
- `mounted` (Boolean) Only compatible with CDROM controllers
- `sub_type` (String) Can be one of : BusLogic, LSILogic, LSILogicSAS, ParaVirtual

### Read-Only

- `hot_add_remove` (Boolean)
- `id` (String) The ID of this resource.
- `label` (String)
- `shared_bus` (String)
- `summary` (String)
- `virtual_disks` (List of String)


Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data "cloudtemple_compute_host_cluster" "clu001" {
}

data "cloudtemple_compute_datastore_cluster" "sdrs001" {
name = "sdrs001-LIVE_"
name = "sdrs001-LIVE_"
datacenter_id = data.cloudtemple_compute_virtual_datacenter.th3s.id
}

Expand All @@ -30,9 +30,9 @@ resource "cloudtemple_compute_virtual_machine" "foo" {
name = "test-terraform-example-controller"
power_state = "on"

memory = 8 * 1024 * 1024 * 1024
cpu = 4
num_cores_per_socket = 1
memory = 8 * 1024 * 1024 * 1024
cpu = 4
num_cores_per_socket = 1

datacenter_id = data.cloudtemple_compute_virtual_datacenter.th3s.id
host_cluster_id = data.cloudtemple_compute_host_cluster.clu001.id
Expand All @@ -41,15 +41,15 @@ resource "cloudtemple_compute_virtual_machine" "foo" {
}

resource "cloudtemple_compute_virtual_controller" "bar" {
virtual_machine_id = cloudtemple_compute_virtual_machine.foo.id
type = "CD/DVD"
virtual_machine_id = cloudtemple_compute_virtual_machine.foo.id
type = "CD/DVD"
content_library_item_id = data.cloudtemple_compute_content_library_item.ubuntu-cloudinit.id
connected = true
mounted = true
connected = true
mounted = true
}

resource "cloudtemple_compute_virtual_controller" "baz" {
virtual_machine_id = cloudtemple_compute_virtual_machine.pbt-crashtest.id
type = "SCSI"
sub_type = "ParaVirtual"
type = "SCSI"
sub_type = "ParaVirtual"
}

0 comments on commit e954aa7

Please sign in to comment.