Quick Start
Static credentials are the fastest way to get Terrateam working with GCP. You’ll create a GCP service account with programmatic access and store the credentials as GitHub secrets.
Quick Start
Static credentials are the fastest way to get Terrateam working with GCP. You’ll create a GCP service account with programmatic access and store the credentials as GitHub secrets.
Create a dedicated service account for Terrateam in your GCP project:
gcloud iam service-accounts create terrateam \--description="Terrateam service account" \--display-name="Terrateam" \--project="$PROJECT_ID"
Attach an IAM role to give Terrateam the necessary permissions. We suggest roles/editor
as a starting point:
gcloud projects add-iam-policy-binding "$PROJECT_ID" \--member="serviceAccount:terrateam@$PROJECT_ID.iam.gserviceaccount.com" \--role="roles/editor"
Generate a service account key file:
gcloud iam service-accounts keys create terrateam-service-account-key.json \--iam-account="terrateam@$PROJECT_ID.iam.gserviceaccount.com"
Add the GCP service account key as a secret to your GitHub repository:
# Set your repository (replace with your actual org/repo)export REPO="your-org/your-repo"
# Create the Google Credentials secret from the key filegh secret --repo "$REPO" set GOOGLE_CREDENTIALS < terrateam-service-account-key.json
Now that you have GCP authentication configured, you are now able to use Terrateam for plan and apply operations against GCP resources.