Skip to content

Commit

Permalink
added environment variables for lwa_repo and branch
Browse files Browse the repository at this point in the history
  • Loading branch information
PLucianP committed Jan 8, 2024
1 parent 819a6c8 commit 8928138
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deployments/terraform/7-lwa-app-deployment-pla/locals.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# --- 7-lwa-app-deployment-pla/locals.tf ---

locals {
https_url_environment_js_template = "https://raw.githubusercontent.com/axiologic-pla/LWA/main/environment.js.template"
https_url_environment_js_template = "https://raw.githubusercontent.com/${ var.lwa_repo }/${ var.lwa_branch }/environment.js.template"

fqdn = var.hostname == "" ? var.dns_domain : join(".", [var.hostname, var.dns_domain])

Expand Down
5 changes: 5 additions & 0 deletions deployments/terraform/7-lwa-app-deployment-pla/terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ TOTAL_WAIT_TIME="${14}"
GTO_TIME_PER_CALL="${15}"
GTO_TOTAL_WAIT_TIME="${16}"

LWA_REPO="${17}"
LWA_BRANCH="${18}"

DEPLOYMENT_NAME="LWA"

FQDN=$DNS_DOMAIN
Expand Down Expand Up @@ -57,6 +60,8 @@ time_per_call = ${TIME_PER_CALL}
total_wait_time = ${TOTAL_WAIT_TIME}
gto_time_per_call = ${GTO_TIME_PER_CALL}
gto_total_wait_time = ${GTO_TOTAL_WAIT_TIME}
lwa_repo = "${LWA_REPO}"
lwa_branch = "${LWA_BRANCH}"
EOF

terraform init -reconfigure \
Expand Down
12 changes: 12 additions & 0 deletions deployments/terraform/7-lwa-app-deployment-pla/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ variable "hostname" {
type = string
default = ""
}

variable "lwa_repo" {
type = string
default = ""
}

variable "lwa_branch" {
type = string
default = ""
}


0 comments on commit 8928138

Please sign in to comment.