Skip to content

This recipe is an Infrastructure as Code (IaC) recipe for deploying cloud projects in Google Cloud Platform (GCP).

License

Notifications You must be signed in to change notification settings

SLIB53/project-iac-recipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project IaC Recipe

This recipe is an Infrastructure as Code (IaC) recipe for deploying cloud projects in Google Cloud Platform (GCP). It demonstrates how to set up an Infrastructure-as-Code project with GitHub Actions, and includes a couple workflows:

Setup

In this case, using Terraform requires some preconfiguration:

  1. Cloud Storage bucket (to serve as the Terraform backend)
  2. an authorized service account in IAM with access to the bucket

Hint: See the Project Preconfiguration IaC Recipe for how to perform the preconfiguration using Terraform.

The GitHub Actions workflows require the following environment variables:

Secret Name Description
GCP_PROJECT_ID The GCP Project ID of the target project for deployment
GCP_SA_KEY The GCP IAM credentials used to authenticate and authorize GitHub Actions (use base64 encoded JSON)
GCS_BACKEND_BUCKET_NAME The name of the bucket used to store the tfsate (passed into the "bucket" parameter of a gcs backend)

About

This recipe is an Infrastructure as Code (IaC) recipe for deploying cloud projects in Google Cloud Platform (GCP).

Topics

Resources

License

Stars

Watchers

Forks

Languages