如何在 terraform 中设置 winrm AllowUnencrypted="true" 和 auth @{Basic="true"}

Ala*_*RGE 3 azure winrm terraform

我试图从 terraform 启用 winRm。但 winRM 附加设置如

winrm set winrm/config/service @{AllowUnencrypted="true"} 
winrm set winrm/config/service/auth @{Basic="true"} 
Run Code Online (Sandbox Code Playgroud)

无法在 tf 文件中正确添加。

小智 6

你只是错过了引号。更换你的线路:

winrm set winrm/config/service `@{AllowUnencrypted="true"}
Run Code Online (Sandbox Code Playgroud)

用这一行代替:

winrm set winrm/config/service '@{AllowUnencrypted="true"}'
Run Code Online (Sandbox Code Playgroud)