All Projects → hooklift → terraform-provider-vix

hooklift / terraform-provider-vix

Licence: MPL-2.0 License
VMware VIX provider for Terraform

Programming Languages

go
31211 projects - #10 most used programming language
HCL
1544 projects
Makefile
30231 projects

Projects that are alternatives of or similar to terraform-provider-vix

Bento
Packer templates for building minimal Vagrant baseboxes for multiple platforms
Stars: ✭ 3,779 (+3836.46%)
Mutual labels:  vmware-workstation, vmware-fusion
terraform-provider-inwx
terraform provider for INWX
Stars: ✭ 23 (-76.04%)
Mutual labels:  terraform-provider
Ansible-VMware-Workstation-Fusion-Pro-Modules
Ansible meet VMware Workstation/Fusion Pro
Stars: ✭ 41 (-57.29%)
Mutual labels:  vmware-workstation
terraform-provider-launchdarkly
Terraform LaunchDarkly provider
Stars: ✭ 16 (-83.33%)
Mutual labels:  terraform-provider
terraform-provider-testing
An experimental Terraform provider to assist in writing tests for Terraform modules
Stars: ✭ 59 (-38.54%)
Mutual labels:  terraform-provider
terraform-provider-k8s
Kubernetes Terraform provider with support for raw manifests
Stars: ✭ 129 (+34.38%)
Mutual labels:  terraform-provider
terraform-provider-infoblox
Infoblox plugin for Terraform
Stars: ✭ 40 (-58.33%)
Mutual labels:  terraform-provider
terraform-provider-elasticstack
Terraform provider for Elastic Stack
Stars: ✭ 61 (-36.46%)
Mutual labels:  terraform-provider
terraform-provider-citrixadc
Terraform Custom Provider for Citrix ADC (formerly Citrix NetScaler)
Stars: ✭ 89 (-7.29%)
Mutual labels:  terraform-provider
terraform-provider-mackerel
Terraform provider for Mackerel
Stars: ✭ 16 (-83.33%)
Mutual labels:  terraform-provider
terraform-provider-jxadmin
A Jenkins X provider for terraform
Stars: ✭ 14 (-85.42%)
Mutual labels:  terraform-provider
terraform-provider-dns
Supports DNS updates (RFC 2136) and can optionally be configured with secret key based transaction authentication (RFC 2845).
Stars: ✭ 75 (-21.87%)
Mutual labels:  terraform-provider
go-graylog
Graylog API client for Go and terraform provider for Graylog
Stars: ✭ 45 (-53.12%)
Mutual labels:  terraform-provider
terraform-provider-filesystem
A @hashicorp Terraform provider for interacting with the filesystem
Stars: ✭ 61 (-36.46%)
Mutual labels:  terraform-provider
terraform-provider-ovirt
Terraform provider for oVirt 4.x
Stars: ✭ 125 (+30.21%)
Mutual labels:  terraform-provider
terraform-provider-hsdp
Terraform provider to orchestrate various HSDP resources like IAM, CDL, CDR, MDM, Container Host, Edge, etc
Stars: ✭ 26 (-72.92%)
Mutual labels:  terraform-provider
terraform-provider-junos
Terraform's provider for Junos devices
Stars: ✭ 44 (-54.17%)
Mutual labels:  terraform-provider
terraform-provider-statuscake
Terraform StatusCake provider.
Stars: ✭ 26 (-72.92%)
Mutual labels:  terraform-provider
terraform-provider-panos
Terraform Panos provider
Stars: ✭ 56 (-41.67%)
Mutual labels:  terraform-provider
terraform-provider-opennebula
Terraform provider for OpenNebula
Stars: ✭ 38 (-60.42%)
Mutual labels:  terraform-provider

VMware VIX provider for Terraform

Gitter Build Status

Allows you to define infrastructure for VMware Fusion, Workstation, Server and Player.

Mailing list

Google groups: https://groups.google.com/group/terraform-provider-vix

Requirements

  • VMware Fusion or Workstation installed
  • Govix: The library used to interface with VMware
  • Godep: Dependency manager
  • Terraform

The exact list of dependencies can be found in the Godeps file. To install dependencies run: godep get

Development workflow

Make sure you exported DYLD_LIBRARY_PATH or LD_LIBRARY_PATH with a path pointing to vendor/libvix

  1. Make changes in your local fork of terraform-provider-vix
  2. Test your changes running TF_LOG=1 terraform plan or TF_LOG=1 terraform apply inside a directory that contains *.tf files declaring VIX resources.

Provider configurations

Minimal configuration

resource "vix_vm" "core02" {
	name = "core02"
	gui = true
	image {
        url = "https://github.com/c4milo/dobby-boxes/releases/download/stable/coreos-stable-vmware.box"
        checksum = "545fec52ef3f35eee6e906fae8665abbad62d2007c7655ffa2ff4133ea3038b8"
        checksum_type = "sha256"
    }
}

A more advanced configuration

variable "password" {
     default: ""
}

provider "vix" {
    # valid options are: "fusion", "workstation", "serverv1", "serverv2", "player"
    # and "workstation_shared"
    product = "fusion"
    verify_ssl = false

    # clone_type can be "full" or "linked". Advantages of one over the other are described here:
    # https://www.vmware.com/support/ws5/doc/ws_clone_typeofclone.html
    clone_type = "linked"
}

resource "vix_vswitch" "vmnet10" {
    name = "vmnet10"
    nat = true
    dhcp = true
    range = "192.168.1.0/24"
    host_access = true
}

resource "vix_vm" "core01" {
    name = "core01"
    description = "Terraform VMWARE VIX test"

    # The provider will download, verify, decompress and untar the image. 
    # Ideally you will provide images that have VMware Tools installed already,
    # otherwise the provider will be considerably limited for what it can do.
    image {
        url = "https://github.com/c4milo/dobby-boxes/releases/download/stable/coreos-stable-vmware.box"
        checksum = "545fec52ef3f35eee6e906fae8665abbad62d2007c7655ffa2ff4133ea3038b8"
        checksum_type = "sha256"

        # If image is encrypted we need to provide a password
        password = "${var.password}"
    }

    cpus = 1
    # Memory sizes must be provided using IEC sizes such as: kib, ki, mib, mi, gib or gi.
    memory = "1.0gib"
    count = 1
    upgrade_vhardware = false
    tools_init_timeout = 30s

    # Be aware that GUI does not work if VM is encrypted
    gui = true

    # Whether to enable or disable all shared folders for this VM
    sharedfolders = true

    # Advanced configuration
    network_adapter {
        # type can be either "custom", "nat", "bridged" or "hostonly"
	    type = "custom"
	    mac_address = "00:50:56:aa:bb:cc"

	    # mac address type can be "static", "generated" or "vpx"
	    mac_address_type = "static"

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

    # Minimal required
    network_adapter {
	    type = "bridged"
    }
    
    network_adapter {
        type = "nat"
        mac_address = "00:50:56:aa:bb:cc"
        mac_address_type = "static"
    }

    network_adapter {
        type = "hostonly"
    }

    shared_folder {
        enable = false
        name = "Dev1"
        guest_path = "/home/camilo/dev"
        host_path = "/Users/camilo/Development"
        readonly = false
    }
}

Known issues

  • When launching multiple VM resources, make sure all of them have the same GUI setting, otherwise a race condition will kick in and terraform apply will fail. This issue is being tracked here #10

  • Terraform count attribute does not work with vix_vm resources as Terraform does not provide a way to get the resource index, causing the provider to fail. This issue is being tracked here hashicorp/terraform#141

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].