Ir para o conteúdo

Terraform Backend

pipeline status Latest Release

[[TOC]]

Intro

This repository has the configuration for "Terraform Backend", this mean that have the configuration for where terraform should read/write the file with the last infrastructure status and version.

In our case, we are storing it in Azure Storage Containers, check here: * DEV * STAGING * PROD

Dependencies

Documentation

All repositories that change infrastructure need to add this project as a git submodule.

Example:

cd other-git-repository-inside-infrastructure-group
git submodule add -b "main" ../terraform-backend.git
Note: git submodule add with relative path (..) will use the relative path in GitLab. In this case, .. goes to https://gitlab.com/primetag/infrastructure.

Instead of using these files in a repository, you can put it in GitLab CI/CD ENVIRONMENT VARIABLES, but if you change in environment variables, you will change in all projects. And with git submodule, you can update gitsubmodules version one project by one, and test each one individually.


With ❤️ from Primetag - Engineering Team