https://github.com/global-vmware/vcd_independent_disk
This Repository contains the "vcd_independent_disk" Terraform Module. You can use this Module to deploy Named Disks into a VMware Cloud Director (VCD) Environment.
https://github.com/global-vmware/vcd_independent_disk
disk infrastructure-as-code terraform terraform-module vm vmware
Last synced: 11 months ago
JSON representation
This Repository contains the "vcd_independent_disk" Terraform Module. You can use this Module to deploy Named Disks into a VMware Cloud Director (VCD) Environment.
- Host: GitHub
- URL: https://github.com/global-vmware/vcd_independent_disk
- Owner: global-vmware
- Created: 2023-05-16T20:45:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:41:51.000Z (over 2 years ago)
- Last Synced: 2025-06-04T17:10:25.312Z (about 1 year ago)
- Topics: disk, infrastructure-as-code, terraform, terraform-module, vm, vmware
- Language: HCL
- Homepage: https://www.rackspace.com/cloud/vmware
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# VCD Independent Disk Terraform Module
This Terraform module will deploy VCD Independent Disks into an existing VMware Cloud Director (VCD) Environment. This module can be used to provision new Independent Disks into [Rackspace Technology SDDC Flex](https://www.rackspace.com/cloud/private/software-defined-data-center-flex) VCD Data Center Regions.
## Requirements
| Name | Version |
|-----------|---------|
| terraform | ~> 1.2 |
| vcd | ~> 3.8 |
## Resources
| Name | Type |
|----------------------------------------------------------------------|--------------|
| [vcd_independent_disk](https://registry.terraform.io/providers/vmware/vcd/latest/docs/resources/independent_disk) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|-----------------|------------------------------------------------------------------|------|---------|----------|
| `vdc_org_name` | The name of the Organization in VCD | string | `"Organization Name Format: --"` | yes |
| `vdc_name` | Cloud Director VDC Name | string | `"Virtual Data Center Name Format: --"` | Yes |
| `disk_params` | A list of maps containing disk parameters. Each map item describes a single disk. | list(object({ name = string, size_in_mb = string, bus_type = string, bus_sub_type = string, storage_profile = string, sharing_type = string, metadata = list(object({ key = string, value = string, type = string, user_access = string, is_system = bool })) })) | `[{name = "DataDisk01", size_in_mb = "102400", bus_type = "SCSI", bus_sub_type = "lsilogicsas", storage_profile = "Standard", sharing_type = "None", metadata = []}, {name = "DataDisk02", size_in_mb = "204800", bus_type = "SCSI", bus_sub_type = "lsilogicsas", storage_profile = "Performance", sharing_type = "None", metadata = []}]` | no |
## Outputs
| Name | Description |
|------------------|------------------------------------------|
| `independent_disks` | Information about the created independent disks. The output is a map where the keys are the disk IDs and the values are maps with the following fields: `name`, `size_in_mb`, `bus_type`, `bus_sub_type`, `storage_profile`, `sharing_type`, `description`, `metadata`, and `is_attached`. |
## Example Usage
This is an example of a `main.tf` file that uses the `"github.com/global-vmware/vcd_independent_disk"` Module source to create independent disks in a VMware Cloud Director environment:
```terraform
module "vcd_independent_disk" {
source = "github.com/global-vmware/vcd_independent_disk.git?ref=v1.1.1"
vdc_org_name = ""
vdc_name = ""
disk_params = [
{
name = "Prod App Web 01-WebDataDisk01"
size_in_mb = "102400"
bus_type = "SCSI"
bus_sub_type = "lsilogicsas"
storage_profile = "Standard"
sharing_type = "None"
metadata = [
{
key = "Built By"
value = "Terraform"
type = "MetadataStringValue"
user_access = "READWRITE"
is_system = false
},
{
key = "Cost Center"
value = "IT Department - 1001"
type = "MetadataStringValue"
user_access = "READWRITE"
is_system = false
}
]
},
// More disks can be added here
]
}
```
## Authors
This module is maintained by the [Global VMware Cloud Automation Services Team](https://github.com/global-vmware).