Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Latest commit

 

History

History
18 lines (17 loc) · 901 Bytes

TERRAFORM_SETUP.md

File metadata and controls

18 lines (17 loc) · 901 Bytes

Terraform setup

  1. Install Terraform if it's not available,
  2. Create Terraform backend GCS bucket, which will be used to store TF state:
    export TERRAFORM_STATE_BUCKET_ID="<your-bucket-id-to-store-terraform-state>"
    gsutil mb -p ${BBQ_PROJECT_ID} gs://${TERRAFORM_STATE_BUCKET_ID}/
  3. Export BBQ, BBQ metadata and BBQ restoration project ids:
    export TF_VAR_bbq_project=${BBQ_PROJECT_ID}
    export TF_VAR_bbq_metadata_project=${BBQ_METADATA_PROJECT_ID}
    export TF_VAR_bbq_restoration_project=${BBQ_RESTORATION_PROJECT_ID}
  4. Create a bucket to store remotely infrastructure state Terraform by running the following commands:
    terraform init -backend-config="bucket=${TERRAFORM_STATE_BUCKET_ID}"