Open techimply opened 3 years ago
I was having similar issues. Currently I developed my main.tf with WinRM set to unencrypted. Currently just working with it as proof of concept, but if it could actually run it with encryption, it would be such a good tool for me.
I was having similar issues. Currently I developed my main.tf with WinRM set to unencrypted. Currently just working with it as proof of concept, but if it could actually run it with encryption, it would be such a good tool for me.
Yup similar situation here. Fun for staging or in a sandbox but having WinRM unencrypted is a non starter in prod
I've run into this bug as well.
When WinRM is configured to use HTTPS - the issue doesn't happen.
According to MS - using HTTP for WinRM is secure if you're using it with Kerberos
"Regardless of the transport protocol used (HTTP or HTTPS), WinRM always encrypts all PowerShell remoting communication after initial authentication." From Microsoft
So a WinRM configuration that uses HTTP and has 'AllowUnencrypted = false' set is a supported/secure/working configuration
somewhat tangentially, and aligning with what @techimply mentioned - we also utilize ansible with the same endpoints this provider is having issues with (configured as HTTP & allowunencrypted=false) and ansible works with that configuration
Terraform Version and Provider Version
Terraform v0.14.10 /hashicorp/ad v0.4.2
Windows Version
Client: Server 2016 DC: 2012 R2 Domain & Forest functional = Windows Server 2008 R2
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
Important Factoids
If winRM setting 'AllowUnencrypted = false' is set on the destination DC terraform will always fail with 'error: http error while making kerberos authenticated winRM request: %!s()'. As soon as 'AllowUnencrypted = true' is set, the provider works as intended. Perhaps I am missing a flag here? I have no issues connecting via HTTP & Kerberos using other software such as ansible.
References
https://github.com/hashicorp/terraform-provider-ad/issues/90
Community Note