Using multiple Subscriptions

We are working with many Subscriptions and having multiple providers using them as below:

resource “azurerm_resource_group” “hub_rg” {
provider = “azurerm.dev-sub1”
name = “dev_rg”
location = “East US”
}

Do we need to add the provider statement for every resource? Even when giving the Resource Group? The provider statement is not very well documented and described how to use.

Best
Jan

The provider attribute is required for any resource or datasource that isn’t using the default provider (one setup without an alias). The documentation can be found at Provider Configuration - Configuration Language - Terraform by HashiCorp

Thanks for answer!
Yes I now found the statement in the documentation also. I was first think why Terraform couldn’t figure out from the Resource Group which Provider that was used but I believe it makes sense to require it anyway. Maybe having this statement as [optional] in the documentation for each resource type?
Best
//Jan