terraformhosthyper-v

Building virtual machines with Terraform using Hyper-V provider


I'm trying to build some virtual machines using a Hyper-V provider with Terraform. I was looking for information about the host parameter that I need to add in hyperv provider's configuration. Then, I saw something like I need an Hyper-V API but I don't know anything about that and I don't understand so well what I founded. Can someone give me an example how to prepare the API or explain where can I found more information?

provider "hyperv" {
  user     = <User>
  password = <Password>
  host     = ????
  port     = ????
}

Solution

  • The host is referring to the machine that hyper-v is on that you would be deploying the VM to. If that is your localhost or a remote server you would need to provide a FQDN or an IP address. I'll caution you that this terraform provider plugin is still in beta.