Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 1a2c0e25 authored by Adam Robinson's avatar Adam Robinson
Browse files

make customer db url a var

parent f65c84ba
......@@ -81,31 +81,31 @@ module "vpn" {
# ## Receiving 404 error ##
data "google_service_account_id_token" "customer_db_token" {
target_audience = "https://us-central1-gcp-at-um-db.cloudfunctions.net/customer_db"
target_audience = var.customer_db_cloud_function_url
}
resource "null_resource" "customer_database" {
triggers = {
security_contact = var.security_contact
mcomm_group_email = var.mcomm_group_email
shortcode = var.shortcode
vpn = var.vpn
dt_phi = var.dt_phi
dt_ferpa = var.dt_ferpa
dt_pii = var.dt_pii
dt_glba = var.dt_glba
dt_hsr = var.dt_hsr
dt_ssn = var.dt_ssn
dt_acp = var.dt_acp
dt_it_sec_info = var.dt_it_sec_info
dt_itar = var.dt_itar
dt_pci = var.dt_pci
dt_fisma = var.dt_fisma
dt_other_data = var.dt_other_data
security_contact = var.security_contact
mcomm_group_email = var.mcomm_group_email
shortcode = var.shortcode
vpn = var.vpn
dt_phi = var.dt_phi
dt_ferpa = var.dt_ferpa
dt_pii = var.dt_pii
dt_glba = var.dt_glba
dt_hsr = var.dt_hsr
dt_ssn = var.dt_ssn
dt_acp = var.dt_acp
dt_it_sec_info = var.dt_it_sec_info
dt_itar = var.dt_itar
dt_pci = var.dt_pci
dt_fisma = var.dt_fisma
dt_other_data = var.dt_other_data
dt_other_data_info = var.dt_other_data_info
}
provisioner "local-exec" {
command = "curl https://us-central1-gcp-at-um-db.cloudfunctions.net/customer_db -H \"Authorization: Bearer ${data.google_service_account_id_token.customer_db_token.id_token}\" -H \"Content-Type: application/json\" -d '${jsonencode(local.curl_body)}'"
command = "curl ${var.customer_db_cloud_function_url} -H \"Authorization: Bearer ${data.google_service_account_id_token.customer_db_token.id_token}\" -H \"Content-Type: application/json\" -d '${jsonencode(local.curl_body)}'"
}
}
......@@ -189,3 +189,9 @@ variable "dt_other_data_info" {
description = "A description of the Other Sensitive Data"
default = ""
}
variable "customer_db_cloud_function_url" {
type = string
description = "The URL to a cloud function that updates the customer database. This is not a customer facing setting."
default = "https://us-central1-gcp-at-um-db.cloudfunctions.net/customer_db"
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment