fix(windows-rdp): properly escape username and password in patch file (#xxx)
- Updated the `patch_file_contents` to use `jsonencode` for `CODER_USERNAME` and `CODER_PASSWORD` to preserve special characters.
This commit is contained in:
parent
afa23b8d3c
commit
02b5ae42f1
@ -52,8 +52,9 @@ resource "coder_script" "windows-rdp" {
|
||||
# doesn't allow recursive calls to the templatefile function. Have to feed
|
||||
# results of the JS template replace into the powershell template
|
||||
patch_file_contents = templatefile("${path.module}/devolutions-patch.js", {
|
||||
CODER_USERNAME = var.admin_username
|
||||
CODER_PASSWORD = var.admin_password
|
||||
# Properly escape the username and password to preserve special characters
|
||||
CODER_USERNAME = jsonencode(var.admin_username)
|
||||
CODER_PASSWORD = jsonencode(var.admin_password)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user