Hi Team,
I’m new to terraform and wanted to understand the best practices in multi - account deployment. We have a common code base and all resources needs to be deployed in all accounts. We have created multiple .tf files in root module (i.e service related components in one single tf file) and we will be using a separate .tfvars for each account and this file will be used while calling terraform apply. Here is the folder structure.
project
- glue.tf
- lakeformation.tf
- s3.tf
- variables.tf
env_vars
- sbx.tfvars
- prod.tfvars
backend_config
- sbx.conf
- prod.conf
Initially thought of using workspaces but I see workspace use a common state backend for all the workspaces which might not be good.
Also i have one query w.r.t module, can we use child module in the main.tf file if the child module source is a remote git repo?
Any suggestions please?
Thanks
Nithin