Hi Community,
I am new in Terraform and i have started learning this .
I am getting the below error
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Error ensuring Resource Providers are registered.
│
│ Terraform automatically attempts to register the Resource Providers it supports to
│ ensure it's able to provision resources.
│
│ If you don't have permission to register Resource Providers you may wish to use the
│ "skip_provider_registration" flag in the Provider block to disable this functionality.
│
│ Please note that if you opt out of Resource Provider Registration and Terraform tries
│ to provision a resource from a Resource Provider which is unregistered, then the errors
│ may appear misleading - for example:
│
│ > API version 2019-XX-XX was not found for Microsoft.Foo
│
│ Could indicate either that the Resource Provider "Microsoft.Foo" requires registration,
│ but this could also indicate that this Azure Region doesn't support this API version.
│
│ More information on the "skip_provider_registration" flag can be found here:
│ https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration
│
│ Original Error: Cannot register providers: Microsoft.MachineLearningServices, Microsoft.OperationalInsights, Microsoft.ManagedIdentity, Microsoft.DBforMariaDB, Microsoft.HealthcareApis, Microsoft.ServiceBus. Errors were: Cannot register provider Microsoft.MachineLearningServices with Azure Resource Manager: Post "https://management.azure.com/subscriptions/1d902123-bc1c-4dcc-9779-6f6995d97b72/providers/Microsoft.MachineLearningServices/register?api-version=2022-09-01": HTTP response was nil; connection may have been reset.
│ Cannot register provider Microsoft.OperationalInsights with Azure Resource Manager: Post "https://management.azure.com/subscriptions/1d902123-bc1c-4dcc-9779-6f6995d97b72/providers/Microsoft.OperationalInsights/register?api-version=2022-09-01": HTTP response was nil; connection may have been reset.
│ Cannot register provider Microsoft.ManagedIdentity with Azure Resource Manager: Post "https://management.azure.com/subscriptions/1d902123-bc1c-4dcc-9779-6f6995d97b72/providers/Microsoft.ManagedIdentity/register?api-version=2022-09-01": HTTP response was nil; connection may have been reset.
│ Cannot register provider Microsoft.DBforMariaDB with Azure Resource Manager: Post "https://management.azure.com/subscriptions/1d902123-bc1c-4dcc-9779-6f6995d97b72/providers/Microsoft.DBforMariaDB/register?api-version=2022-09-01": HTTP response was nil; connection may have been reset.
│ Cannot register provider Microsoft.HealthcareApis with Azure Resource Manager: Post "https://management.azure.com/subscriptions/1d902123-bc1c-4dcc-9779-6f6995d97b72/providers/Microsoft.HealthcareApis/register?api-version=2022-09-01": HTTP response was nil; connection may have been reset.
│ Cannot register provider Microsoft.ServiceBus with Azure Resource Manager: Post "https://management.azure.com/subscriptions/1d902123-bc1c-4dcc-9779-6f6995d97b72/providers/Microsoft.ServiceBus/register?api-version=2022-09-01": HTTP response was nil; connection may have been reset.
│
│ with provider["registry.terraform.io/hashicorp/azurerm"],
│ on main.tf line 10, in provider "azurerm":
│ 10: provider "azurerm" {
│
main.tf
terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = "3.104.2" } } } provider "azurerm" { subscription_id = "xxxxxxxxxxxxxxxxx" tenant_id = "xxxxxxxxxxxxxxxxx" client_id = "xxxxxxxxxxxxxxxxx" client_secret = "xxxxxxxxxxxxxxxxx" features {} } resource "azurerm_resource_group" "appgrp" { name = "app-grp" location = "Central India" }