Please remember Welcome to the forum - please reformat your message when pasting code.
No, it is not like that, it would be more like
module "f5_nva_region_a" {
source = "./modules/f5_nva_region_a"
subscription_id = var.azure_subscription_id
tenant_id = var.azure_tenant_id
client_id = var.azure_client_id
client_secret = var.azure_client_secret
environment = var.azure_environment
}
and then in a separate .tf file in the modules/f5_nva_region_a/ directory
variable "azure_subscription_id" {}
variable "azure_tenant_id" {}
variable "azure_client_id" {}
variable "azure_client_secret" {}
variable "azure_environment" {}
provider "azurerm" {
version = ">=2.2.0, <3.0.0"
subscription_id = var.azure_subscription_id
tenant_id = var.azure_tenant_id
client_id = var.azure_client_id
client_secret = var.azure_client_secret
environment = var.azure_environment
features {}
}
This doesn’t make sense, you can’t have a directory inside a file.
It would be better if you could post a link to a Git repository containing your code. (Make a new one, redacting what you can’t share, if you must.)
And, this, putting the provider configuration in the child modules, is why you are having this problem.