Skip to content

Repository containing scripts/IaC to configure GCP configuration with a focus on Google Play Store apps.

Notifications You must be signed in to change notification settings

davidzenisu/iac-gcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps GCP

Prerequisites

  • Set up a GCP account (reference)
  • Fork this repository to your organization/account (reference)
  • Create and enter a GitHub Codespace for the forked repository in the IDE of your choice (VS Code or browser)

Initialization

  • Press CTRL+` to open the terminal in the root of the repository.
  • Run bash ./init.sh to run the initialization script.
  • When prompted, log into your GCP as well as your GitHub account using the browser.
  • Once the script has executed successfully, you should see a secret called GCP_WORKLOAD_PROVIDER created for your GitHub repository (reference):

GitHub Action Secret

Testing

  • Create a new branch (e.g.: feature/new_infrastructure).
  • Extend main.tf with IaC configuration that you would like to implement.
  • Commit and push your code.
  • Navigate to the Actions tab of your GitHub repository to see your running jobs (reference)
  • You should see a job named tf plan.
  • The result of your terraform plan should show up there:

Backend

Caution

Without this configuration your pipeline will set up a local backend during runtime which are discarded on a Github-hosted runner after completion!

To set up a backend, you need to follow two more steps during setup:

  • Configure the partial backend configuration by replacing "local" with your preffered backend in backend.tf, e.g.: gcs.
  • Provide the backend configuration to the GitHub workflow terraform init steps (multiple!) so it can use the correct backend. The details should be provided via GitHub secrets and the authentication to the backend should always use identity federation or other secure alternatives!

About

Repository containing scripts/IaC to configure GCP configuration with a focus on Google Play Store apps.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published