-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
33 lines (30 loc) · 1.04 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
terraform {
required_version = "~> 1.2"
required_providers {
vcd = {
source = "vmware/vcd"
version = "~> 3.8"
}
}
}
resource "vcd_independent_disk" "disk" {
org = var.vdc_org_name
vdc = var.vdc_name
count = length(var.disk_params)
name = var.disk_params[count.index]["name"]
size_in_mb = var.disk_params[count.index]["size_in_mb"]
bus_type = var.disk_params[count.index]["bus_type"]
bus_sub_type = var.disk_params[count.index]["bus_sub_type"]
storage_profile = var.disk_params[count.index]["storage_profile"]
sharing_type = var.disk_params[count.index]["sharing_type"]
dynamic "metadata_entry" {
for_each = var.disk_params[count.index]["metadata"]
content {
key = metadata_entry.value["key"]
value = metadata_entry.value["value"]
type = metadata_entry.value["type"]
user_access = metadata_entry.value["user_access"]
is_system = metadata_entry.value["is_system"]
}
}
}