This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: /projects/<project>/<stack>/stack.tm.hcl | |
stack { | |
name = "My awesome <stack>" | |
description = "This stack defines awesome resources" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# File: /projects/my-project-<env>/<stack>/provider.tf | |
provider "google" { | |
project = "my-project-<env>" | |
region = "europe-north1" | |
} | |
terraform { | |
required_providers { | |
google = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
projects/ | |
├── my-project-prod/ | |
│ ├── stack-1/ | |
│ │ ├── main.tf | |
│ │ ├── provider.tf | |
│ │ └── backend.tf | |
│ └── stack-2/ | |
│ │ ├── main.tf | |
│ │ ├── provider.tf | |
│ │ └── backend.tf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
globals { | |
env = "staging" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is part of Terramate Configuration. | |
# Terramate is an orchestrator and code generator for Terraform. | |
# Please see https://github.com/mineiros-io/terramate for more information. | |
# | |
# To generate/update Terraform code within the stacks run `terramate generate` from the repositories root directory. | |
### USER MAPS ################################################################ | |
# | |
# As GitHub usernames are hard to maintain we generate mappings here to real names. | |
# This will help maintain large lists of users and improve on-/off-boardings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"files.associations": { | |
"*.tm.hcl": "terramate" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go install github.com/mineiros-io/terramate-ls/cmd/[email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L -o terramate-ls.tar.gz https://github.com/mineiros-io/terramate-ls/releases/download/v0.0.2/terramate-ls_0.0.2_linux_x86_64.tar.gz | |
tar xvf terramate-ls.tar.gz | |
sudo cp terramate-ls /usr/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stack { | |
name = "My production VPC" | |
after = [ | |
"/stacks/gcp-projects/my-staging/my-vpc", | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TERRAMATE: GENERATED AUTOMATICALLY DO NOT EDIT | |
// TERRAMATE: originated from generate_hcl block on /stacks/config.tm | |
terraform { | |
backend "gcs" { | |
bucket = "my-state-bucket" | |
prefix = "stacks/gcp-projects/my-prod/my-vpc" | |
} | |
} |