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

vSphere network label inconsistency with VDS in vCenter folder #8584

Closed
qvallance-ctc opened this issue Aug 31, 2016 · 11 comments
Closed

vSphere network label inconsistency with VDS in vCenter folder #8584

qvallance-ctc opened this issue Aug 31, 2016 · 11 comments

Comments

@qvallance-ctc
Copy link

Running into an issue with networking in the vsphere provider:

Terraform cannot locate the network interface label when the virtual distributed switch (vds) is located in a folder, unless the folder is added to the label path (e.g., 'folder/label'). Once the VM is deployed, if another Terraform plan/apply is run against the resource it will identify the network interface label as not containing the folder, thus requiring the resource to be recreated or config changed.

Terraform Version

Terraform v0.7.2

vSphere Version

vSphere 6.0

Affected Resource(s)

  • vsphere_virtual_machine

Error Example

When the config includes just the label it cannot find the label:

  network_interface {
      label = "label"
      ipv4_address = "10.0.0.10"
      ipv4_prefix_length = "24"
      ipv4_gateway = "10.0.0.1"
  }
terraform apply
[...]
Error applying plan:

1 error(s) occurred:

* vsphere_virtual_machine.rhl7: network '*label' not found

When the label includes folder, it deploys fine but it does not match the label returned when planning/applying:

  network_interface {
      label = "folder/label"
      ipv4_address = "10.0.0.10"
      ipv4_prefix_length = "24"
      ipv4_gateway = "10.0.0.1"
  }
terraform plan
[...]
    network_interface.0.label:              "label" => "folder/label" (forces new resource)
@GuillaumeMorini
Copy link

same for me here

@becks
Copy link

becks commented Oct 2, 2016

I have the same problem. Thanks!

@sizgiyaev
Copy link

Hi, is there a solution for the issue?

@lvlie
Copy link

lvlie commented Apr 5, 2017

+1
This is still the same in 0.9.1. We use a workaround to be able to add resources without existing resources being recreated, but this adds other problems if you would want to change the network (requires a taint first):

lifecycle {
  ignore_changes = ["network_interface"]
}

@sidhurana
Copy link

Hi,

My network label is "v686 10.10.0.0/16" So, it contains space and forward slash. While executing i am getting same error : Network not found.

Any idea how to get rid of this ?

Thanks,
Sudhir

@stravze
Copy link

stravze commented Sep 15, 2017 via email

@sidhurana
Copy link

Hi James,

Terraform version: 0.9.2

@sidhurana
Copy link

sidhurana commented Sep 15, 2017

Just tried with latest version.i.e. 0.10.5. Got same results.

@stravze
Copy link

stravze commented Sep 15, 2017 via email

@Malet
Copy link

Malet commented Sep 29, 2017

I've also run into this same issue on the latest version 0.10.6 @lvlie thanks for the workaround!

There is also a bug report in the provider repo: hashicorp/terraform-provider-vsphere#11

@ghost
Copy link

ghost commented Apr 7, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants