File tree 2 files changed +6
-11
lines changed
2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,7 @@ resource "vsphere_virtual_machine" "vm" {
34
34
}
35
35
36
36
extra_config = {
37
- " guestinfo.userdata" = var.cloud_init_data
38
- " guestinfo.metadata" = var.metadata
39
- }
40
-
41
- vapp {
42
- properties = {
43
- " guestinfo.hostname" = " local-foo.example.com" ,
37
+ " guestinfo.userdata" = file (var. cloud_init_data [count . index ])
38
+ " guestinfo.metadata" = file (var. metadata [count . index ])
44
39
}
45
40
}
Original file line number Diff line number Diff line change @@ -53,13 +53,13 @@ variable vm_memory {
53
53
}
54
54
55
55
variable "cloud_init_data" {
56
- type = string
56
+ type = list ( string )
57
57
description = " User-input for cloud init"
58
- default = " "
58
+ default = [ " " ]
59
59
}
60
60
61
61
variable "metadata" {
62
- type = string
62
+ type = list ( string )
63
63
description = " metadata for cloud init"
64
- default = " "
64
+ default = [ " " ]
65
65
}
You can’t perform that action at this time.
0 commit comments