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

Please include folders in search for network_interface labels in vsphere_virtual_machine provider #11

Closed
hashibot opened this issue Jun 13, 2017 · 4 comments
Labels
enhancement Type: Enhancement

Comments

@hashibot
Copy link

This issue was originally opened by @xantheran as hashicorp/terraform#5843. It was migrated here as part of the provider split. The original body of the issue is below.


I have been running into an issue with the vsphere_virtual_machine provider. My networks are in a folder off of root so I need to included the folder with the label field under network_interface.

  network_interface {
    label = "Hosted_Network/VL74_dvPortGroup"
    ipv4_address = "10.X.Y.Y"
    ipv4_prefix_length = "24"
  }

The VM gets provisioned just fine, however the folder not taken into account when returning the label for the network_interface. This results in the error below if I taint the resource

Error applying plan:

1 error(s) occurred:

* vsphere_virtual_machine.base: network '*VL74_dvPortGroup_IAP' not found

If I leave the folder in the label field terraform forces a new resource since it detects a change in the rendered plan

-/+ module.stage.couchbase-data.vsphere_virtual_machine.base
    cluster:                                "TerraformTest Hosting Cluster" => "TerraformTest Hosting Cluster"
    datacenter:                             "ZZ Datacenter" => "ZZ Datacenter"
    disk.#:                                 "1" => "1"
    disk.0.datastore:                       "Hosted_Datastores/VMSTOR.1" => "Hosted_Datastores/VMSTOR.1"
    disk.0.template:                        "devops/zz/Templates/ubuntu1404-template" => "devops/zz/Templates/ubuntu1404-template"
    disk.0.type:                            "thin" => "thin"
    dns_servers.#:                          "2" => "2"
    dns_servers.0:                          "10.X.X.X" => "10.X.X.X"
    dns_servers.1:                          "10.X.X.Y" => "10.X.X.Y"
    domain:                                 "devops.internal" => "devops.internal"
    folder:                                 "devops/zz/VMs/Staging/DATA" => "devops/zz/VMs/Staging/DATA"
    gateway:                                "10.X.Y.1" => "10.X.Y.1"
    memory:                                 "8192" => "8192"
    name:                                   "STAGE-COUCHBASE112" => "STAGE-COUCHBASE112"
    network_interface.#:                    "1" => "1"
    network_interface.0.ip_address:         "" => "<computed>"
    network_interface.0.ipv4_address:       "10.X.Y.Y" => "10.X.Y.Y"
    network_interface.0.ipv4_prefix_length: "24" => "24"
    network_interface.0.ipv6_address:       "<scrubbed>" => "<computed>"
    network_interface.0.ipv6_prefix_length: "<scrubbed>" => "<computed>"
    network_interface.0.label:              "VL74_dvPortGroup" => "Hosted_Network/VL74_dvPortGroup (forces new resource)
    network_interface.0.subnet_mask:        "" => "<computed>"
    time_zone:                              "America/Chicago" => "America/Chicago"
    vcpu:                                   "4" => "4"
@hashibot hashibot added the enhancement Type: Enhancement label Jun 13, 2017
krzkowalczyk pushed a commit to krzkowalczyk/terraform-provider-vsphere that referenced this issue Jul 14, 2017
Issue -3: Hot changes to VM attributes CPU/Memory not supported
@caligo-mentis
Copy link

Any updates on this?

@vancluever
Copy link
Contributor

Hey @caligo-mentis - we are almost ready with changes to the vsphere_virtual_machine resource that will address these issues. More details should be available in the coming weeks!

@caligo-mentis
Copy link

Hi @vancluever! Thank you for response, will wait for updates

@vancluever
Copy link
Contributor

Hey all, this functionality has been moved to the vsphere_network data source, and the search works pretty much like you would expect it to work with a command-line tool like govc, allowing a search on any path that is allowable in that tool.

vsphere_virtual_machine now takes the output of this as a parameter for network interfaces. The examples give a good explanation of how this functions.

Thanks!

stobias123 pushed a commit to stobias123/terraform-provider-vsphere that referenced this issue Dec 9, 2019
Adding license banner to .git ignore files
stobias123 pushed a commit to stobias123/terraform-provider-vsphere that referenced this issue Dec 9, 2019
@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants