Commit ca29f18
committed
terraform: fix Windows password injection in userdata_windows.tpl
Use single quotes for the SetPassword argument so PowerShell treats
the injected value literally. With double quotes, any $-containing
password (e.g. 'Io4$$WZy...') gets corrupted by PowerShell variable
expansion ($$ → PID, $WZy → empty var), causing the Windows instance
to boot with a different password than Launchpad holds → WinRM 401.
Terraform templatefile() substitutes ${windows_administrator_password}
before userdata reaches EC2, so single-quoting is safe: Terraform sees
and expands the ${} expression; PowerShell then receives the literal value
with no further interpretation.1 parent c2f274d commit ca29f18
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments