Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform apply returns error 500 if ip_allocation_mode not specified, however plan works fine. #1205

Closed
zeol opened this issue Feb 7, 2024 · 0 comments · Fixed by #1317
Closed
Assignees

Comments

@zeol
Copy link

zeol commented Feb 7, 2024

Terraform Version

Terraform v1.4.7
on linux_amd64

  • provider registry.terraform.io/vmware/vcd v3.11.0

Affected Resource(s)

  • vcd_vapp_vm

Terraform Configuration Files

resource "vcd_vapp_vm" "vm" {
  count = var.vm_count
  vapp_name = "${var.env}-vm"
  name      = "${var.env}-${count.index}"
  vapp_template_id = data.vcd_catalog_vapp_template.template.id
  memory = 4096
  cpus = 4
  cpu_cores = 4
  
 
 dynamic "network" {
  for_each = values(var.vlan_names)
  content {
    type = "org"
    name = data.vcd_network_direct.hrs-vlan.name
    #ip_allocation_mode = "MANUAL"
    ip = network.value[count.index]
  }
 }
 
 
}

Debug Output

https://gist.github.com/zeol/a6e532dd0e72f4e01a453048f7fb1c99

Expected Behavior

Plan should fail, with some descriptive error

Actual Behavior

API returned 500

│ Error: error creating VM from template: [VM creation] error getting VM <VM_NAME> : error instantiating a new VM: API Error: 500: [ f5956605-ac3b-4540-8fa2-665489c2ad86 ] Unable to perform this action. Contact your cloud administrator.

Steps to Reproduce

try to create a resource vcd_vapp_vm with network and ip assigned, but no ip_allocation_mode (as in the code above)

User Access rights

Organization administrator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants