Skip to content

Commit

Permalink
UPdating
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Feb 17, 2022
1 parent 7db31c3 commit adce111
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 3 additions & 1 deletion cloud/gcp/bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -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:?}
Expand All @@ -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 \
Expand Down
5 changes: 5 additions & 0 deletions cloud/gcp/main.tf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion cloud/gcp/udmi-sites.tf.template
Original file line number Diff line number Diff line change
@@ -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@"
Expand Down
7 changes: 0 additions & 7 deletions cloud/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit adce111

Please sign in to comment.