Skip to content

Terraform Remote State

In the base-tf-backend folder you should find the definition of the infrastructure that needs to be deployed before you can get to work with anything else.

IMPORTANT: THIS IS ONLY NEEDED IF THE BACKEND WAS NOT CREATED YET. IF THE BACKEND ALREADY EXISTS YOU JUST USE IT.

Configuration

Config files can be found under each config folders

  • 📁 Global config file /config/common.tfvars contains global context TF variables that we inject to TF commands which are used by all sub-directories such as leverage terraform plan or leverage terraform apply and which cannot be stored in backend.config due to TF.
  • 📁 Account config files
    • backend.tfvars contains TF variables that are mainly used to configure TF backend but since profile and region are defined there, we also use them to inject those values into other TF commands.
    • account.tfvars contains TF variables that are specific to an AWS account.

AWS Profile