rymcmaho2020 / olt-infrastructure-as-code

O'Reilly Live Training - Infrastructure as Code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

O'Reilly Live Training - Infrastructure as Code

Example setup for O'Reilly Live Training.

Setup

  1. Create a GCP account and project.
  2. Set GCP project ID as CLOUDSDK_CORE_PROJECT environment variable.
  3. Run make setup to create the IAM account for GitHub Actions and the networks in dev and prod.
  4. Go into GCP and find the service account for pizza-github-actions.
    1. Create a key.
    2. Download the JSON file for the key and save it so you can add it to GitHub Actions later.
  5. 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 account
    TF_SECRET_VARIABLES Base64-encoded contents of variables for Terraform to use
    TF_BACKEND Base64-encoded contents of backend for Terraform to use

Usage

Each part of the solution aligns with the concepts in the training.

Additional Resources

About

O'Reilly Live Training - Infrastructure as Code

License:Mozilla Public License 2.0


Languages

Language:HCL 71.2%Language:Python 26.1%Language:Makefile 2.7%