Is tfstate now being saved only in in the root acc...
# geodesic
b
Is tfstate now being saved only in in the root account even in a multi-account and multi-region setup? That is what I am understanding based on
terraform-aws-components
branch
upstream-account-comps
.
m
Yeah, that’s the pattern going forward. One tfstate bucket with each component workspace separated using ‘workspace_key_prefix’.
b
Thank you. Follow up question, would that allow us to run
terraform
to do region failover if s3 (and ddb) in the region with bucket is down?
m
Good question… I’m not 100%. S3 has 9s out to wazoo, so I’m not sure that is a much of a concern but it’s likely worth looking into. If DDB is down then you can skip the lock I believe.
b
You see any issues maintaining a replica s3 and ddb in another region? If a failure does occur, we could set a variable to switch to the failover state bucket and ddb.
e
Yea, so what we did was add support to our state bucket module to replicate the state to a backup region
In the failover scenario, we would flip to using the backup bucket
b
Sweet. That’s what I figure.