-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CustomScriptExtension fails for Windows VM #12
Comments
@asote Have you tried using a file or using |
Then the resource "azurerm_virtual_machine_scale_set" "vm-windows" needs to be modified.
Currently it’s as follows:
extension {
name = "vmssextension"
publisher = "Microsoft.Compute"
type = "CustomScriptExtension"
type_handler_version = "1.8"
settings = <<SETTINGS
{
"commandToExecute": "${var.cmd_extension}"
}
SETTINGS
It should be something like this:
extension {
name = "vmssextension"
publisher = "Microsoft.Compute"
type = "CustomScriptExtension"
type_handler_version = "1.8"
settings = <<SETTINGS
{
"fileUris": [ "https://raw.githubusercontent.com/Azure-Samples/compute-automation-configurations/master/automate-iis.ps1" ],
"commandToExecute": "powershell -ExecutionPolicy Unrestricted -File automate-iis.ps1"
}
SETTINGS
|
I just verified that the The |
Set commandToExecute as follows
Fails with the following message:
ing extension 'vmssextension'. Error message: "Invalid handler configuration. Exiting. Error Message: Expecting state 'Element'.. Encountered 'Text'
with name '', namespace ''. "."
The text was updated successfully, but these errors were encountered: