AWS EC2 Windows - WinRM over HTTPS with untrausted certificate
538 views
Skip to first unread message
James Denning
unread,
Dec 9, 2016, 4:33:02 AM12/9/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Terraform
Hi
I am trying to get the file provisioner to connect to a Windows Server 2016 instance in EC2 via WinRM over https (as i want to at least try and interact with the instance in a reasonably secure manner e.g. encrypted). However the compromise has been to use a self-signed certificate generated by the instance attached to the WinRM listener - what this means is that for example a remote Powershell session needs the -SkipCACheck and -SkipCNCheck flags to execute - but execute it does and I can successfully get a remote powershell session (which uses WinRM under the bonnet). However the File Provisioner gets a 401 error. File provisioner connection details:
connection {
type = "winrm"
user = "Administrator"
password = "${var.admin_password}"
timeout = "8m"
https = "true"
insecure = "true"
port=5986
}
The output of TRACE
2016/12/09 09:27:14 [DEBUG] plugin: terraform.exe: file-provisioner (internal) 2016/12/09 09:27:14 connecting to remote shell using WinRM
The only alternatives I have would be to use SSH/Pageant or try http only - can anyone shed some light on whether the Go WinRM client can use https or how can i troubleshoot this further?
Cheers in advance
James
Andrew Hodgson
unread,
Dec 9, 2016, 5:28:20 AM12/9/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to terrafo...@googlegroups.com
Hi James,
I only got this working over HTTP, my understanding is it is an issue with the Go WinRM implementation. I have dropped copying files using this method and now get the host to download files using S3 with the AWS PowerShell tools in a bootstrap script.
--
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.