I’m receiving the error "settings contains and invalid character ‘,’ in the following block of code. The line is calling Powershell commands. The command works fine in PS but when I add this code to my TF script it generates this error. The only ‘,’ are the ones in the PS command which are required. How do I get past this error?
This may not be the only way to solve this issue (and is definitely not the neatest) but you will need to escape the quotes in the middle of the script by using a \ before each of them (except the outer quotes).
Thx for lead. I implemented the ‘’ as you suggested. I now get a similar error stating:
Error: “settings” contains an invalid JSON: invalid character ‘â’ in string escape code
│ with azurerm_virtual_machine_extension.vm_extension_install_iis_dotnet,
│ on main.tf line 97, in resource “azurerm_virtual_machine_extension” “vm_extension_install_iis_dotnet”:
│ 97: resource “azurerm_virtual_machine_extension” “vm_extension_install_iis_dotnet” {
There is no ‘â’ anywhere in the script. Is there any documentation regarding TF and the “commandtoexecute” command?
Thx for lead. I implemented the ‘’ as you suggested. I now get a similar error stating:
Error: “settings” contains an invalid JSON: invalid character ‘â’ in string escape code
│ with azurerm_virtual_machine_extension.vm_extension_install_iis_dotnet,
│ on main.tf line 97, in resource “azurerm_virtual_machine_extension” “vm_extension_install_iis_dotnet”:
│ 97: resource “azurerm_virtual_machine_extension” “vm_extension_install_iis_dotnet” {
There is no ‘â’ anywhere in the script. Is there any documentation regarding TF and the “commandtoexecute” command?