Skip to content

Commit

Permalink
adding bdns_url to csp_src_connect
Browse files Browse the repository at this point in the history
  • Loading branch information
PLucianP committed Jan 5, 2024
1 parent 2101553 commit 675df6f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
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
Expand Up @@ -12,7 +12,7 @@ locals {

csp_script_src_unsafe_hashes = "'sha256-XkPjGMp0z+c11Qt/zG8pIkC1TIiA9lf9XEXevRQbMTU='"

csp_connect_src = local.bdns_json_url_specified ? "${var.csp_src_connect} https://${local.fqdn} ${join(" ", [for url in distinct(regexall("https://[^\"/]+", data.http.bdns_json[0].response_body)) : url])}" : "https://${local.fqdn} ${join(" ", [for url in distinct(regexall("https://[^\"/]+", file(local.bdns_json_local_path))) : url])}"
csp_connect_src = local.bdns_json_url_specified ? "${var.bdns_json_url} https://${local.fqdn} ${join(" ", [for url in distinct(regexall("https://[^\"/]+", data.http.bdns_json[0].response_body)) : url])}" : "https://${local.fqdn} ${join(" ", [for url in distinct(regexall("https://[^\"/]+", file(local.bdns_json_local_path))) : url])}"

s3_object_js = setsubtract(fileset("${path.module}/LWA", "**/*.js"), ["environment.js"])
s3_object_json = setsubtract(fileset("${path.module}/LWA", "**/*.json"), ["bdns.json"])
Expand Down
2 changes: 0 additions & 2 deletions deployments/terraform/7-lwa-app-deployment-pla/terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ TIME_PER_CALL="${13}"
TOTAL_WAIT_TIME="${14}"
GTO_TIME_PER_CALL="${15}"
GTO_TOTAL_WAIT_TIME="${16}"
CSP_SRC_CONNECT="${17}"

DEPLOYMENT_NAME="LWA"

Expand Down Expand Up @@ -58,7 +57,6 @@ 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}
csp_src_connect = ${CSP_SRC_CONNECT}
EOF

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

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

0 comments on commit 675df6f

Please sign in to comment.