Skip to content

Set up Google Cloud Platform Workload Identity Federation for Github

License

Notifications You must be signed in to change notification settings

epiccoolguy/gh-gcp

Repository files navigation

gh-gcp

Set up integration between Github and Google Cloud Platform.

Table of Contents

Installation

  1. Temporarily delete backend.tf so that Terraform can initialize locally.

  2. Run terraform init

  3. Run terraform apply

  4. Create a gcs.conf file that contains the GCS bucket name output by Terraform during apply:

    bucket = "tfstate-xxxx"
    
  5. Restore backend.tf

  6. Run terraform init to migrate the Terraform state to GCS.

  7. 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
  8. 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"

Usage

Instructions on how to use the project and any relevant examples.

License

This project is licensed under the terms of the license provided in the LICENSE file.

About

Set up Google Cloud Platform Workload Identity Federation for Github

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages