Giter Club home page Giter Club logo

terraform-gcp-terraform-cloud-oidc's Introduction

Terraform GCP Terraform Cloud OIDC Provider

CI GitHub issues License

This Terraform module enables you to configure Terraform Cloud as an GCP IAM OIDC identity provider in GCP, which enables Terraform Cloud to access resources within an GCP Projects(s) without requiring long-lived credentials to be stored as Terraform Cloud Variables.

Prerequisites

  • GCP Project(s) and credentials
  • Terraform Cloud Account(s)
  • Git repository integration with Terraform Cloud
  • Terraform >= 1.x
  • Profit?

Deployment / Usage

provider "google" {
  region  = var.region
  project = var.project_id
}

provider "google-beta" {
  region  = var.region
  project = var.project_id
}

module "terraform_cloud" {
  source  = "saidsef/terraform-cloud-oidc/gcp"
  version = ">= 1"

  organisation     = "saidsef"
  projects         = [{ "project" : "platform", "workspaces" : "dev" }]
}

Provider Specifications and Requirements

Please see TERRAFORM.md and Terraform token specification

Terraform Cloud Configure trust variables

After you have create a workspace, navigate to the Variables page and add the following variables:

Category Key Value Sensitive Required
Environment variable TFC_GCP_PROVIDER_AUTH true false Yes
Environment variable TFC_GCP_RUN_SERVICE_ACCOUNT_EMAIL The service account email Terraform Cloud will use when authenticating to GCP false Yes
Environment variable TFC_GCP_WORKLOAD_PROVIDER_NAME The canonical name of the workload identity provider. false Yes
Environment variable TFC_GCP_WORKLOAD_IDENTITY_AUDIENCE [] false No

NOTE: You can undelete a provider for up to 30 days after deletion. After 30 days, deletion is permanent. Until a provider is permanently deleted, you cannot reuse its name when creating a new provider.

Provider Specifications and Requirements

Please see TERRAFORM.md

Source

Our latest and greatest source of terraform-gcp-terraform-cloud-oidc can be found on GitHub. Fork us!

Contributing

We would ❤️ you to contribute by making a pull request.

Please read the official Contribution Guide for more information on how you can contribute.

Useful Links

terraform-gcp-terraform-cloud-oidc's People

Contributors

dependabot[bot] avatar saidsef avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.