Example setup for O'Reilly Live Training.
- Create a GCP account and project.
- Set GCP project ID as
CLOUDSDK_CORE_PROJECT
environment variable. - Run
make setup
to create the IAM account for GitHub Actions and the networks indev
andprod
. - Go into GCP and find the service account for
pizza-github-actions
.- Create a key.
- Download the JSON file for the key and save it so you can add it to GitHub Actions later.
- In your GitHub Actions workflow, set the following secrets for each environment.
Secret name Value CLOUDSDK_CORE_PROJECT GCP Project ID GOOGLE_SERVICE_ACCOUNT_JSON Base64-encoded contents of pizza-github-actions
service accountTF_SECRET_VARIABLES Base64-encoded contents of variables for Terraform to use TF_BACKEND Base64-encoded contents of backend for Terraform to use
Each part of the solution aligns with the concepts in the training.
- Infrastructure as Code, 2nd Edition
- Infrastructure as Code (IAC) Cookbook
- Patterns and Practices for Infrastructure as Code
- Terraform: Up & Running, 2nd Edition
- Manage your infrastructure as code dependencies
- Testing your Cloud Infrastructure (as Code)
- Test-Driven Development (TDD) for Infrastructure
- Slides for Hands-on Policy as Code
- Exploring Policy as Code for Cloud Infrastructure
- Applying Application Feature Toggles to Infrastructure