Skip to content
New issue

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

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

Already on GitHub? # to your account

Crash while refreshing state of vsphere resources #1174

Closed
ghost opened this issue Aug 17, 2020 · 1 comment · Fixed by #1186
Closed

Crash while refreshing state of vsphere resources #1174

ghost opened this issue Aug 17, 2020 · 1 comment · Fixed by #1186
Labels
acknowledged Status: Issue or Pull Request Acknowledged bug Type: Bug crash Impact: Crash size/s Relative Sizing: Small

Comments

@ghost
Copy link

ghost commented Aug 17, 2020

This issue was originally opened by @gmintoco as hashicorp/terraform#25871. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.13.0
+ provider registry.terraform.io/hashicorp/vsphere v1.22.0
...

Terraform Configuration Files

data "vsphere_datacenter" "datacenter" {
  name = var.vmware_datacenter
}

data "vsphere_host" "esxi_host" {
  name          = var.vsphere_host
  datacenter_id = "${data.vsphere_datacenter.datacenter.id}"
}

resource "vsphere_host_virtual_switch" "vswitch" {
  name             = "vSwitch5"
  host_system_id   = data.vsphere_host.esxi_host.id
  network_adapters = ["vmnic1"]
  active_nics      = ["vmnic1"]
  standby_nics     = []
}

The above is initiated as a module from the following module block. The below is the main terraform code.

module "esxi-common" {
  for_each = toset(var.vsphere_hosts)
  source   = "./modules/esxi-common"
  providers = {
    vsphere = vsphere
  }

  vsphere_host     = each.value
  vsphere_user     = var.vsphere_user
  vsphere_server   = var.vsphere_server
  vsphere_password = var.vsphere_password
  # vsphere_vmtraffic_vswitch = var.vsphere_vmtraffic_vswitch
  vmware_datacenter = var.vmware_datacenter
  portgroup1_vlan         = var.portgroup1_vlan         
  portgroup2_vlan      = var.portgroup2_vlan      
}

provider "vsphere" {
  user           = var.vsphere_user
  password       = var.vsphere_password
  vsphere_server = var.vsphere_server

  # If you have a self-signed cert
  allow_unverified_ssl = true
}


...

Debug Output

Crash Output

https://gist.github.com/gmintoco/847b36cd8fd7cc26337309bf1244f948

Expected Behavior

Ideally should have gone ahead an presented a plan

Actual Behavior

Terraform Crashed

Steps to Reproduce

terraform apply

Additional Context

This is a fresh install on ubuntu with a clean terraform install.

References

@ghost ghost added bug Type: Bug new labels Aug 17, 2020
@bill-rich bill-rich added acknowledged Status: Issue or Pull Request Acknowledged crash Impact: Crash size/s Relative Sizing: Small labels Aug 18, 2020
@ghost
Copy link
Author

ghost commented Oct 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
acknowledged Status: Issue or Pull Request Acknowledged bug Type: Bug crash Impact: Crash size/s Relative Sizing: Small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant