Skip to content

alvsanand/playing-with-terramate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playing with Terramate

Terramate

Terramate provides ways to keep your Terraform code DRY and allows to define relationships between stacks and supports you to orchestrate Terraform commands in those stacks with minimal effort to get started in a non-intrusive way.

The idea behind this repository is to test the functionality of Terramate and learn how to use it.

Prerequisites

  • Terraform == 1.2.3
  • Terramate == 0.1.7
  • Localstack

Running AWS with localsack

  • Start localstack in default port (4566):

    localstack start -d > /tmp/localstack.log 2>&1 &

Execute current version of the stacks

  • Check stacks.

    terramate list
  • Init stacks:

    terramate run terraform init
  • Generate plan for every stack:

    terramate run terraform plan
  • Apply plan for every stack:

    terramate run terraform apply

Adding some changes

  • Add some changes.

  • Re-generate TF code:

    terramate generate
  • Commit changes.

  • Check for new stacks.

    terramate list
  • Generate plan for every stack:

    terramate run terraform plan
  • Apply plan for every stack:

    terramate run terraform apply