Hi All,
I am trying to create and doing some customization in azure using attached terraform file.
I need to setup the winrm service in the newly creating machine and needs to execute some powershell scripts there.
I was able to enable the winrm http listener using below command
os_profile_windows_config {
winrm {
protocol = "HTTP"
}
}
But while trying to execute the powershell script the remote connection were rejected.
On further debugging i was able to find the root cause of the issue . I need to configure the winrm setting like below.
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}
Executed the above step manually and able to connect winrm from terraform.
Could someone help me to do the same in terraform file?