I’m still trying at a high level to see if terraspace might be a good direction for us to migrate from terragrunt to solve some pains we are experiencing.
Does terraspace support customizing the way layering is done?
For example, a typical terragrunt project file for us might look like this:
include {
path = "${find_in_parent_folders("account_remote_state.hcl")}"
}
terraform {
source = "git@github.com:org/repo//modules/module"
extra_arguments "required_files" {
commands = [
"apply",
"plan",
"destroy",
"import",
"push",
"refresh",
]
required_var_files = [
"${find_in_parent_folders("global.tfvars")}",
"${find_in_parent_folders("team.tfvars")}"
"${find_in_parent_folders("env.tfvars")}",
"${find_in_parent_folders("account.tfvars")}",
"${find_in_parent_folders("region.tfvars")}",
]
}
}
Context:
- we have multiple teams
- we have multiple envs – for example, qa, stg, prd
- each team has at least one account per environment of a certain account type
- a few teams might have multiple accounts used as different account types.
- within an account, multiple regions are supported.
I see from the https://terraspace.cloud/docs/tfvars/full-layering/ doc that there seems to be some support for specifying per aws account configs, such as:
provider/namespace/region aws/112233445566/us-west-2/{base,dev,instance}.tfvars
Ideally we could avoid having to use account ids in the path to tfvars files as we have numerous accounts and its not immediately obvious the context behind the account.
We would be looking for a path akin to this:
aws/team_a/qa/service/us-east-2/base.tfvars
where:
team = team_a
env = qa
account_type = service
region = us-east-2
Thanks for any suggestions on how to handle this. Happy to provide more context as it possible I didn’t explain things right.
Cheers.