terraform-provider-vcd: Can't create new vm with vcd_vm_internal_disk in tf file
Hi to all.
When I add vcd_vm_internal_disk
to my TF file I can’t create new VMs. It’s always failed on vcd_vm_internal_disk creating. Seems that this module tries to create new disks within just import them from fresh VM. Is there any solution on how to fix it and force it to work properly?
resource "vcd_vapp_vm" "node_zone_5" {
vapp_name = vcd_vapp.developers-cluster.name
name = format("node-%02d.${var.zone_5}.${var.cluster_type}.${var.domain}", count.index + 1)
computer_name = format("node-%02d.${var.zone_5}.${var.cluster_type}.${var.domain}", count.index + 1)
count = var.node_zone_5_count
catalog_name = var.temlate_catalog
template_name = var.vm_teample_node
memory = var.node_zone_5_memory
cpu_cores = var.node_zone_5_cpu_cores
cpus = var.node_zone_5_cpus
vdc = ...
org = var.vcd_org
power_on = "true"
network {
type = "org"
name = var.vcd_network_name_dmz
ip_allocation_mode = "DHCP"
}
network {
type = "org"
name = "Storage-Network"
ip_allocation_mode = "POOL"
}
override_template_disk {
bus_type = "paravirtual"
size_in_mb = "51200"
bus_number = 0
unit_number = 0
storage_profile = "Tier B"
}
metadata = { ... }
customization { initscript = ... }
lifecycle {
prevent_destroy = false
ignore_changes = [
customization
]
}
}
resource "vcd_vm_internal_disk" "node_zone_5_root_disk" {
vapp_name = vcd_vapp.developers-cluster.name
vdc = var.vcd_vapp_vdc
vm_name = format("node-%02d.${var.zone_5}.${var.cluster_type}.${var.domain}", count.index + 1)
count = var.node_zone_5_count
bus_type = "paravirtual"
size_in_mb = "51200"
bus_number = 0
unit_number = 0
storage_profile = "Tier B"
depends_on = [vcd_vapp_vm.node_zone_5]
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (8 by maintainers)
@vbauzysvmware thanks for answers, I`ll close the issue.