Configuration ¶
Configuration Files ¶
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 asleverage terraform plan
orleverage terraform apply
and which cannot be stored inbackend.tfvars
due to TF. - Account config files
backend.tfvars
contains TF variables that are mainly used to configure TF backend but sinceprofile
andregion
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.
- Global
common-variables.tf
file/config/common-variables.tfvars
contains global context TF variables that we symlink to all terraform layers code e.g. shared/us-east-1/tools-vpn-server/common-variables.tf. -
build.env
file- By utilizing the
build.env
capability, you can easily change some default behaviors of the CLI. Read more in its dedicated "Override defaults viabuild.env
file" section.
- By utilizing the
Setting credentials for Terraform via AWS profiles ¶
- File
backend.tfvars
will inject the profile name that TF will use to make changes on AWS. - Such profile is usually one that relies on another profile to assume a role to get access to each corresponding account.
- Please read the credentials section to understand the alternatives supported by Leverage to authenticate with AWS.
- Read the following page leverage doc to understand how to set up a profile to assume a role