From adce111b458385feec546c1798d36756900ba352 Mon Sep 17 00:00:00 2001 From: Trevor Pering Date: Thu, 17 Feb 2022 15:21:53 -0800 Subject: [PATCH] UPdating --- cloud/gcp/bin/setup | 4 +++- cloud/gcp/main.tf.template | 5 +++++ cloud/gcp/udmi-sites.tf.template | 1 - cloud/gcp/variables.tf | 7 ------- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cloud/gcp/bin/setup b/cloud/gcp/bin/setup index 1ae83829a9..a0352fdaf8 100755 --- a/cloud/gcp/bin/setup +++ b/cloud/gcp/bin/setup @@ -18,6 +18,7 @@ export GCP_PROJECT_ID=${GCP_PROJECT_ID:?} export GCP_PROJECT_REGION=${GCP_PROJECT_REGION:?} export GCP_PROJECT_GROUP=${GCP_PROJECT_GROUP:?} export GCP_PROJECT_CREDS="`base64 -w 0 $CRED_FILE`" +export GCP_PROJECT_BILLING=${GCP_PROJECT_BILLING:?} export UDMI_SITE_NAME=${UDMI_SITE_NAME:?} export UDMI_SITE_REGION=${UDMI_SITE_REGION:?} export UDMI_SITE_GROUP=${UDMI_SITE_GROUP:?} @@ -29,7 +30,8 @@ cat $CONFIG_FILE | fgrep -v _CREDS= echo Creating main.tf sed -E < main.tf.template > main.tf \ - -e "s/@GCP_PROJECT_ID@/${GCP_PROJECT_ID}/" + -e "s/@GCP_PROJECT_ID@/${GCP_PROJECT_ID}/" \ + -e "s/@GCP_PROJECT_BILLING@/${GCP_PROJECT_BILLING}/" echo Creating udmi-sites.tf sed -E < udmi-sites.tf.template > udmi-sites.tf \ diff --git a/cloud/gcp/main.tf.template b/cloud/gcp/main.tf.template index 4198d80b6c..04739e5ed8 100644 --- a/cloud/gcp/main.tf.template +++ b/cloud/gcp/main.tf.template @@ -3,11 +3,16 @@ resource "google_project" "udmi-project" { project_id = var.gcp_project_id name = var.gcp_project_name + billing_account = "@GCP_PROJECT_BILLING@" lifecycle { # Stop any terraform plan which would destroy this GCP project. prevent_destroy = true } + + provisioner "local-exec" { + command = "sleep 10" + } } terraform { diff --git a/cloud/gcp/udmi-sites.tf.template b/cloud/gcp/udmi-sites.tf.template index dee6241847..5e65fbbbf6 100644 --- a/cloud/gcp/udmi-sites.tf.template +++ b/cloud/gcp/udmi-sites.tf.template @@ -1,7 +1,6 @@ module "ZZ-TRI-FECTA" { source = "./modules/terraform-google-udmi-site" gcp_project = var.gcp_project_name - gcp_project = var.gcp_region site_name = "@UDMI_SITE_NAME@" site_region = "@UDMI_SITE_REGION@" site_group = "group:@UDMI_SITE_GROUP@" diff --git a/cloud/gcp/variables.tf b/cloud/gcp/variables.tf index 085af72e6c..f582905f35 100644 --- a/cloud/gcp/variables.tf +++ b/cloud/gcp/variables.tf @@ -22,13 +22,6 @@ variable "gcp_auth_file" { description = "GCP authentication file" } -# GCP flaky control -variable "gcp_flakiness_sleep" { - type = number - description = "GCP provisioning sleep to control flakiness" - default = 2 -} - variable "tf-state-bucket-name" { type = string description = "The name of the Google Storage Bucket to create to store the Terraform state"