This repository contains the Terraform code to create the infrastructure for the helmless GCP project using Terramate.
All tools in this project are managed using asdf. You must install asdf and the required plugins before you can use the tools in this project.
brew install asdf
asdf plugin add terraform
asdf plugin add terramate
asdf plugin add tflint
asdf plugin add pre-commitThen run the following command to install the required versions of the tools:
asdf installAnd finally, install the pre-commit hooks:
pre-commit installThe project is structured into the following stacks:
stacks/project-factory: Contains the base infrastructure and GCP project setup, including the state bucket.stacks/github-federation: Contains the Github integration setup to allow the pipelines to authenticate with GCP.stacks/e2e-tests: Contains Cloud Run Services for the e2e tests in helmless/helmless.
To plan changes for all stacks, run the following command:
NOTE
You must commit all changes before running this command.
The command will fail if there are uncommitted changes.
To work around this, you can setexport TM_DISABLE_SAFEGUARDS=git
Authenticate with GCP:
gcloud auth application-default loginPlan the changes:
terramate script run planAnd to apply the changes, run the following command:
terramate script run apply