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 e620705b authored by Adam Robinson's avatar Adam Robinson
Browse files

Merge branch 'fix_customer_db' into 'master'

fix up customer database

See merge request !12
parents be29090a f1a075f1
......@@ -30,7 +30,15 @@ locals {
//dev = ""
test = "https://us-central1-gcp-at-um-db.cloudfunctions.net/customer_db" # Need a test DB
prod = "https://us-central1-gcp-at-um-db.cloudfunctions.net/customer_db"
}
}
curl_body = {
kind = "billing"
billingAccountId = google_billing_subaccount.customer_subaccount.billing_account_id
billing_contact = var.billing_contact
mcomm_group_email = var.mcomm_group_email
shortcode = var.shortcode
}
}
module "audit" {
......@@ -160,13 +168,14 @@ data "google_service_account_id_token" "customer_db_token" {
resource "null_resource" "customer_database" {
triggers = {
billing_contact = var.billing_contact
billingAccountId = google_billing_subaccount.customer_subaccount.billing_account_id
billing_contact = var.billing_contact
mcomm_group_email = var.mcomm_group_email
shortcode = var.shortcode
shortcode = var.shortcode
}
provisioner "local-exec" {
command = "curl ${local.database_function_url[var.environment]} -H \"Authorization: Bearer ${data.google_service_account_id_token.customer_db_token.id_token}\" -H \"Content-Type: application/json\" -d '{\"kind\": \"billing\", \"billingAccountId\": \"asdf\"}'"
command = "curl ${local.database_function_url[var.environment]} -H \"Authorization: Bearer ${data.google_service_account_id_token.customer_db_token.id_token}\" -H \"Content-Type: application/json\" -d '${jsonencode(local.curl_body)}'"
}
}
......
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