This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 12
12
* - A lot of the HTML selectors in this file will look nonstandard. This is
13
13
* because they are actually custom Angular components.
14
14
* - It is strongly advised that you avoid template literals that use the
15
- * placeholder syntax via the dollar sign. The Terraform script looks for
16
- * these characters so that it can inject Coder-specific values, so any
17
- * template literal that uses the character actually needs to double up each
18
- * of them. There are already a few places in this file where it couldn't be
19
- * avoided, but avoiding this as much as possible will save you some headache.
15
+ * placeholder syntax via the dollar sign. The Terraform file is treating this
16
+ * as a template file, and because it also uses a similar syntax, there's a
17
+ * risk that some values will trigger false positives. If a template literal
18
+ * must be used, be sure to use a double dollar sign to escape things.
20
19
* - All the CSS should be written via custom style tags and the !important
21
20
* directive (as much as that is a bad idea most of the time). We do not
22
21
* control the Angular app, so we have to modify things from afar to ensure
Original file line number Diff line number Diff line change @@ -35,9 +35,13 @@ resource "coder_script" "windows-rdp" {
35
35
display_name = " windows-rdp"
36
36
icon = " https://svgur.com/i/158F.svg" # TODO: add to Coder icons
37
37
38
- script = templatefile (" ${ path . module } /windows -installation.tftpl" , {
38
+ script = templatefile (" ${ path . module } /powershell -installation-script .tftpl" , {
39
39
admin_username = var.admin_username
40
40
admin_password = var.admin_password
41
+
42
+ # Wanted to have this be in the powershell template file, but Terraform
43
+ # doesn't allow recursive calls to the templatefile function. Have to feed
44
+ # results of the JS template replace into the powershell template
41
45
patch_file_contents = templatefile (" ${ path . module } /devolutions-patch.js" , {
42
46
CODER_USERNAME = var.admin_username
43
47
CODER_PASSWORD = var.admin_password
File renamed without changes.
You can’t perform that action at this time.
0 commit comments