I was trying to enable winRm from terraform. But winRM additional settings like
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}
are not able to add properly in tf file.
I was trying to enable winRm from terraform. But winRM additional settings like
winrm set winrm/config/service @{AllowUnencrypted="true"}
winrm set winrm/config/service/auth @{Basic="true"}
are not able to add properly in tf file.
You're just missing the quotes. Replace your line:
winrm set winrm/config/service `@{AllowUnencrypted="true"}
With this line instead:
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
To enable the WinRM in the Azure Windows VM, I would suggest you use the VM extension. You can create a PowerShell script to enable WinRM and execute it in the VM extension.
You can see the steps of Setting up WinRM access for Virtual Machines and How to configure the VM to enable WinRM through PowerShell script.