Set up integration between Github and Google Cloud Platform.
-
Temporarily delete
backend.tf
so that Terraform can initialize locally. -
Run
terraform init
-
Run
terraform apply
-
Create a
gcs.conf
file that contains the GCS bucket name output by Terraform during apply:bucket = "tfstate-xxxx"
-
Restore
backend.tf
-
Run
terraform init
to migrate the Terraform state to GCS. -
Create a fine-grained personal access token on Github with access to this repository and the following repository permissions:
- Read access to metadata
- Read and Write access to secrets
-
Store the Github personal access token as secret in this repository:
echo "github_pat_xxx" | gh secret set GH_SECRETS_TOKEN --repo="epiccoolguy/gh-gcp"
Instructions on how to use the project and any relevant examples.
This project is licensed under the terms of the license provided in the LICENSE file.