https://github.com/helmless/gcp-infrastructure
A Terraform infrastructure repository to manage cloud resources for testing.
https://github.com/helmless/gcp-infrastructure
google terraform
Last synced: about 1 year ago
JSON representation
A Terraform infrastructure repository to manage cloud resources for testing.
- Host: GitHub
- URL: https://github.com/helmless/gcp-infrastructure
- Owner: helmless
- Created: 2024-11-19T11:22:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T10:15:54.000Z (about 1 year ago)
- Last Synced: 2025-03-27T11:26:50.412Z (about 1 year ago)
- Topics: google, terraform
- Language: HCL
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# helmless-gcp-infrastructure
This repository contains the Terraform code to create the infrastructure for the [helmless](https://helmless.io) GCP project using [Terramate](https://terramate.io).
## Prerequisites
All tools in this project are managed using [asdf](https://asdf-vm.com/). You must install asdf and the required plugins before you can use the tools in this project.
```bash
brew install asdf
asdf plugin add terraform
asdf plugin add terramate
asdf plugin add tflint
asdf plugin add pre-commit
```
Then run the following command to install the required versions of the tools:
```bash
asdf install
```
And finally, install the pre-commit hooks:
```bash
pre-commit install
```
## Project Structure
The project is structured into the following [stacks](https://terramate.io/docs/cli/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](https://github.com/helmless/helmless).
## Usage
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 set `export TM_DISABLE_SAFEGUARDS=git`
Authenticate with GCP:
```bash
gcloud auth application-default login
```
Plan the changes:
```bash
terramate script run plan
```
And to apply the changes, run the following command:
```bash
terramate script run apply
```