hooklift / terraform-provider-vix

VMware VIX provider for Terraform
Mozilla Public License 2.0
103 stars 22 forks source link

Implement network adapter configuration #6

Closed c4milo closed 10 years ago

c4milo commented 10 years ago

A network adapter resource does not exists outside of a virtual machine in VMware. So, it is not possible to model it as a normal resource in Terraform. That's why we have to embed it inside the vix_vm resource.

The block inside the vm resource would look like this:

network_adapter {
        # type can be either "custom", "nat", "bridged" or "hostonly"
        type = "custom"
        mac_address = "00:00:00:00:00"

        # vswitch is only required when network type is "custom"
        vswitch = ${vix_vswitch.vmnet10.name}
        driver = "vmxnet3"
}

The minimal version looks like this:

 network_adapter {
        type = "bridged"
}
c4milo commented 10 years ago

Removed wake_on_lan and start_connected as govix does not allow to modify them yet. It is not a govix limitation, though.

c4milo commented 10 years ago

Removed mac_address_type from comfiguration spec. If a MAC address is defined it will assume "static" and "generated" otherwise.

c4milo commented 10 years ago

Mostly addressed in https://github.com/c4milo/terraform_vix/commit/56f4a3d69eff52935325c32e667f3c8b5ab897a0. There is a remaining issue where any modifications to the adapters will cause the MAC to be regenerated. We will keep track of this in another issue.