Skip to content

Commit

Permalink
Merge pull request #135 from Cloud-Temple/doc/130
Browse files Browse the repository at this point in the history
Updated documentation on disk type and iam roles
  • Loading branch information
fsn-ct committed Mar 6, 2024
2 parents faa3de5 + 5161348 commit 9194552
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
13 changes: 6 additions & 7 deletions docs/resources/compute_virtual_disk.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ page_title: "cloudtemple_compute_virtual_disk Resource - terraform-provider-clou
subcategory: "Compute"
description: |-
To manage this resource you will need the following roles:
- compute_write
- compute_management
- compute_read
- compute_management_read
- compute_management_write
- activity_read
---

# cloudtemple_compute_virtual_disk (Resource)

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

## Example Usage
Expand Down Expand Up @@ -72,7 +68,10 @@ resource "cloudtemple_compute_virtual_disk" "foo" {
### Required

- `capacity` (Number)
- `disk_mode` (String)
- `disk_mode` (String) disk_mode can have multiple different values :
- Persistent: Changes are immediately and permanently written to the virtual disk.
- Independent non persistent: Changes to virtual disk are made to a redo log and discarded at power off. Not affected by snapshots.
- Independent persistent: Changes are immediately and permanently written to the virtual disk. Not affected by snapshots.
- `provisioning_type` (String)
- `virtual_machine_id` (String)

Expand Down
14 changes: 10 additions & 4 deletions docs/resources/compute_virtual_machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ description: |-
Virtual machines can be created using three different methods:
by creating a new instance with guest_operating_system_morefby cloning an existing virtual machine with clone_virtual_machine_idby deploying a content library item with content_library_id and content_library_item_id
To manage this resource you will need the following roles:
- compute_write
- compute_read
- compute_infrastructure_read
- compute_infrastructure_write
- compute_management
- copute_read
- compute_virtual_machine_power
- activity_read
- tag_read
- tag_write
Expand All @@ -25,8 +28,11 @@ Provision a virtual machine. This allows instances to be created, updated, and d
- by deploying a content library item with `content_library_id` and `content_library_item_id`

To manage this resource you will need the following roles:
- `compute_write`
- `compute_read`
- `compute_infrastructure_read`
- `compute_infrastructure_write`
- `compute_management`
- `copute_read`
- `compute_virtual_machine_power`
- `activity_read`
- `tag_read`
- `tag_write`
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ func New(version string) func() *schema.Provider {
"cloudtemple_backup_sla_policy_assignment": documentResource(resourceBackupSLAPolicyAssignment(), "backup_read", "backup_write", "activity_read"),
"cloudtemple_compute_network_adapter": documentResource(resourceNetworkAdapter(), "compute_write", "compute_read", "activity_read"),
"cloudtemple_compute_virtual_controller": documentResource(resourceVirtualController(), "compute_write", "compute_read", "activity_read"),
"cloudtemple_compute_virtual_disk": documentResource(resourceVirtualDisk(), "compute_write", "compute_read", "compute_management_read", "compute_management_write", "activity_read"),
"cloudtemple_compute_virtual_machine": documentResource(resourceVirtualMachine(), "compute_write", "compute_read", "activity_read", "tag_read", "tag_write"),
"cloudtemple_compute_virtual_disk": documentResource(resourceVirtualDisk(), "compute_management", "compute_read", "activity_read"),
"cloudtemple_compute_virtual_machine": documentResource(resourceVirtualMachine(), "compute_infrastructure_read", "compute_infrastructure_write", "compute_management", "copute_read", "compute_virtual_machine_power", "activity_read", "tag_read", "tag_write"),
"cloudtemple_iam_personal_access_token": documentResource(resourcePersonalAccessToken(), "iam_offline_access"),
},
}
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/resource_compute_virtual_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func resourceVirtualDisk() *schema.Resource {
"disk_mode": {
Type: schema.TypeString,
Required: true,
Description: `disk_mode can have multiple different values :
- Persistent: Changes are immediately and permanently written to the virtual disk.
- Independent non persistent: Changes to virtual disk are made to a redo log and discarded at power off. Not affected by snapshots.
- Independent persistent: Changes are immediately and permanently written to the virtual disk. Not affected by snapshots.`,
},
"capacity": {
Type: schema.TypeInt,
Expand Down

0 comments on commit 9194552

Please sign in to comment.