Re: [terraform] Can Chef provisioner use an Azure VM private ip for WinRM sessions

229 views
Skip to first unread message

Paul Hinze

unread,
Mar 25, 2016, 11:30:31 AM3/25/16
to terrafo...@googlegroups.com
Hi Wesley,

You can specify a different IP address for a provisioner by setting the `host` parameter in the `connection` block:

resource "azure_instance" "foo" {
  # ...
  # Use private IP instead of default public IP to provision.
  # This IP needs to be accessible from the machine where Terraform runs.
  connection {
    host = "${self.ip_address}"
  }
}

Hope this helps!

Paul

On Wed, Mar 9, 2016 at 6:32 AM, <wesleyvand...@gmail.com> wrote:
Hi,


I've deployed a Windows VM  on Azure with terraform and I would like to provision this VM with Chef. I'm trying to use Terraform's Chef provisioner to install the chef client on the Windows VM via WinRM. After the VM is deployed Terraform is trying to contact the VM via WinRM on the public ip address of the VM. 

I would like to know if it is possible to let Terraform start a WinRM sessions to the private ip of the Azure VM instead of using its public ip address. I searched through the documentation of Terraform and Google but was unable to answer my question.


With best regards,

Wesley van den Hengel

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/c5b815f8-0c2e-445a-98fc-f6604b2408b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ben.mi...@scrippsnetworks.com

unread,
Nov 7, 2016, 4:02:04 PM11/7/16
to Terraform
I'm struggling trying to get Terraform, Azure, and Chef to work together. Can you send me a copy of your TF script with Windows/Chef so I can see it?

Regards,
Ben Mitchell
Reply all
Reply to author
Forward
0 new messages