I am building a terraform for my production infrastructure. My module directory structure is like below
main.tf
variable.tf
terraform.tfvars
|----->AKS/main.tf
|----->Mysql/main.tf
|----->Kafka/main.tf
I am facing issues to design state files for the above structure. While building AKS we have to run manually/script to create state file ("We cannot create this storage account and blob container using Terraform itself since).
is there any way to define state file at all module-level while deploying complete stack without running below command in child module.
az storage container create --name terraform-state --account-name mytf --account-key xxxxx