Getting Error while applying the plan

Hi, Could you please help me to resolve my issue, my plan completing successfully, but while applying the plan getting ERRORs -

azurerm_virtual_machine_extension.vs_community: Still creating… [1m30s elapsed]
azurerm_virtual_machine_extension.git_windows: Still creating… [1m30s elapsed]

│ Error: Code=“VMExtensionProvisioningError” Message="VM has reported a failure when processing extension ‘customScript’ (publisher ‘Microsoft.Compute’ and type ‘CustomScriptExtension’). Error message: ‘Command execution finished, but failed because it returned a non-zero exit code of: ‘-196608’. The command had an error output of: ‘The argument ‘./install_git_windows.ps1’ to the -File parameter does not exist. Provide the path to an existing ‘.ps1’ file as an argument to the -File parameter.\r\n’’. More information on troubleshooting is available at Azure Custom Script Extension for Windows - Azure Virtual Machines | Microsoft Learn. "

│ with azurerm_virtual_machine_extension.vs_community,
│ on main.tf line 92, in resource “azurerm_virtual_machine_extension” “vs_community”:
│ 92: resource “azurerm_virtual_machine_extension” “vs_community” {



│ Error: Code=“VMExtensionProvisioningError” Message="VM has reported a failure when processing extension ‘customScript’ (publisher ‘Microsoft.Compute’ and type ‘CustomScriptExtension’). Error message: ‘Command execution finished, but failed because it returned a non-zero exit code of: ‘-196608’. The command had an error output of: ‘The argument ‘./install_git_windows.ps1’ to the -File parameter does not exist. Provide the path to an existing ‘.ps1’ file as an argument to the -File parameter.\r\n’’. More information on troubleshooting is available at Azure Custom Script Extension for Windows - Azure Virtual Machines | Microsoft Learn. "

│ with azurerm_virtual_machine_extension.git_windows,
│ on main.tf line 114, in resource “azurerm_virtual_machine_extension” “git_windows”:
│ 114: resource “azurerm_virtual_machine_extension” “git_windows” {

My Terraform Code is to -

  1. Creating a VM instance on Azure Windows Server 2019 x64 Gen1 with standrad_D2s_v3 - 2 vcpus, 8GB memory
  2. subsequently, Install Visual Studio 2019 community, and
  3. Install Git for Windows

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.