Loading...
Loading...
### Terraform Version ```shell Terraform v1.3.7 on linux_amd64 ``` ### Terraform Configuration Files ``` resource "null_resource" "remote-exec" { count = "${var.instances}" # this is the number of VMs i provision connection { type = "winrm" user = var.admin_user password = var.admin_password host = one(vra7_deployment.Windows_Desktop[count.index].resource_configuration)["instances"][count.index]["ip_address"] } provisioner "file" { source = "JoinDomain.ps1" destination = "c:/Users/***/AppData/Local/Temp/JoinDomain.ps1" } provisioner "remote-exec" { inline = [ "powershell -ExecutionPolicy Unrestricted -File \"c:/Users/***/AppData/Local/Temp/JoinDomain.ps1\" \"Domain.local\" \"Testuser@Domain.local\" \"10.***.***.*\"" ] } ``` ### Debug Output n/a ### Expected Behavior [null_resource.remote-exec[0] (remote-exec):[C:\Users\***>powershell -ExecutionPolicy Unrestricted -File "c:/Users/AppData/Local/Temp/JoinDomain.ps1" "Domain.local" "Testuser@Domain.local" "10.*.**.**" [null_resource.remote-exec[0]: Still creating... [2m50s elapsed][0m [1mnull_resource.remote-exec[0] (remote-exec):[0mWARNING: The changes will take effect after you restart the computer AUT-7580. [1mnull_resource.remote-exec[0] (remote-exec):[0mVERBOSE: Performing the operation "Test-ComputerSecureChannel" on target "AUT-7580". [1mnull_resource.remote-exec[0] (remote-exec):[0mTrue [1mnull_resource.remote-exec[0] (remote-exec):[0mVERBOSE: The secure channel between the local computer and the domain ***.local is in good condition. [1mnull_resource.remote-exec[0]: Creation complete after 3m0s [id=6099486594879622166][[32m Apply complete! Resources: 2 added, 0 changed, 0 destroyed.. ### Actual Behavior [1mnull_resource.remote-exec[0] (remote-exec):[0mC:\Users\nable>powershell -ExecutionPolicy Unrestricted -File "c:/Users/***/AppData/Local/Temp/JoinDomain.ps1" "Domain.local" "Testuser@Domain.local" "10.***" [1mnull_resource.remote-exec[0]: Still creating... [1m50s elapsed][0m [1mnull_resource.remote-exec[0]: Still creating... [2m0s elapsed][0m [1mnull_resource.remote-exec[0]: Creation complete after 2m2s [id=406568817569139061][0m [32m Apply complete! Resources: 2 added, 0 changed, 0 destroyed ### Steps to Reproduce 1. terraform init 2. terraform apply --auto-approve ### Additional Context We are trying to execute PowerShell script in windows device remote-exec but we are facing issue sometime that file cannot be execute and skips that step as shown in behaviors. After checking the windows device we got to know file which we are executing is not copying to the path we specified. ### References _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.