Mixing tfvars with regards to accounts and regions (AWS)

The use case here that I have is the following

I have a (substantial) set of stacks that need to be applied on a per region basis, ie. the entire dev environment (TS_ENV=dev) is deployed across multiple regions and all in a single AWS account (whoever dev is working on that stack at the time will deploy a copy in their own development AWS account)

However there is one set of resources that they all need to end up using which all reside in a single account. (publicly routed DNS material is managed from a single AWS account).

So can you mix and match the content of tfvars with some material being in a region, and others being in a specific AWS account inside the same repo? Or should i just split them up into two separate projects and manage them that way?



There shouldn’t be any forseeable issues with this approach?

personally, I simply add a map with region name and the value inside

Note, you could also check https://terraspace.cloud/docs/tfvars/custom-layering/ to add a new layer