terraform-provider-vcd
terraform-provider-vcd copied to clipboard
Attaching direct org network to `vcd_vapp_vm` with incorrect IP gives non informative error
Attaching direct org network to vcd_vapp_vm
with incorrect IP gives non informative error.
Such HCL definition
resource "vcd_vapp_vm" "web1" {
# ...
network {
type = "org"
name = vcd_vapp_org_network.direct-net.org_network_name
ip = "10.10.104.161"
ip_allocation_mode = "MANUAL"
}
}
Will result in such error if ip
address does not actually belong to direct network.
vcd_vapp_vm.web1: Still creating... [10s elapsed]
Error: error completing tasks: task did not complete successfully: [500:INTERNAL_SERVER_ERROR] - [ 79c957da-00eb-4619-9c51-6bfea5091e75 ] Internal Server Error
- Couldn't find NIC with given index 0
on vcd.TestAccVcdVAppVm_Basic.tf line 115, in resource "vcd_vapp_vm" "web1":
115: resource "vcd_vapp_vm" "web1" {
Such error handling needs improvement
Thnx, I spend more then an hour, before looking here. Great feedback