refactor: clean up final code
This commit is contained in:
@@ -12,11 +12,10 @@
|
|||||||
* - A lot of the HTML selectors in this file will look nonstandard. This is
|
* - A lot of the HTML selectors in this file will look nonstandard. This is
|
||||||
* because they are actually custom Angular components.
|
* because they are actually custom Angular components.
|
||||||
* - It is strongly advised that you avoid template literals that use the
|
* - It is strongly advised that you avoid template literals that use the
|
||||||
* placeholder syntax via the dollar sign. The Terraform script looks for
|
* placeholder syntax via the dollar sign. The Terraform file is treating this
|
||||||
* these characters so that it can inject Coder-specific values, so any
|
* as a template file, and because it also uses a similar syntax, there's a
|
||||||
* template literal that uses the character actually needs to double up each
|
* risk that some values will trigger false positives. If a template literal
|
||||||
* of them. There are already a few places in this file where it couldn't be
|
* must be used, be sure to use a double dollar sign to escape things.
|
||||||
* avoided, but avoiding this as much as possible will save you some headache.
|
|
||||||
* - All the CSS should be written via custom style tags and the !important
|
* - All the CSS should be written via custom style tags and the !important
|
||||||
* directive (as much as that is a bad idea most of the time). We do not
|
* directive (as much as that is a bad idea most of the time). We do not
|
||||||
* control the Angular app, so we have to modify things from afar to ensure
|
* control the Angular app, so we have to modify things from afar to ensure
|
||||||
|
|||||||
@@ -35,9 +35,13 @@ resource "coder_script" "windows-rdp" {
|
|||||||
display_name = "windows-rdp"
|
display_name = "windows-rdp"
|
||||||
icon = "https://svgur.com/i/158F.svg" # TODO: add to Coder icons
|
icon = "https://svgur.com/i/158F.svg" # TODO: add to Coder icons
|
||||||
|
|
||||||
script = templatefile("${path.module}/windows-installation.tftpl", {
|
script = templatefile("${path.module}/powershell-installation-script.tftpl", {
|
||||||
admin_username = var.admin_username
|
admin_username = var.admin_username
|
||||||
admin_password = var.admin_password
|
admin_password = var.admin_password
|
||||||
|
|
||||||
|
# Wanted to have this be in the powershell template file, but Terraform
|
||||||
|
# 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", {
|
patch_file_contents = templatefile("${path.module}/devolutions-patch.js", {
|
||||||
CODER_USERNAME = var.admin_username
|
CODER_USERNAME = var.admin_username
|
||||||
CODER_PASSWORD = var.admin_password
|
CODER_PASSWORD = var.admin_password
|
||||||
|
|||||||
Reference in New Issue
Block a user