Not able to create resource group with Terraform
Hi Community,
I have shared terraform file for creating resource group. When i run terraform plan -out main.tfplan
i got the Planning failed output. Later i deleted all the changes and perform all the steps again , then i able to create resource group. How i solve this by selecting the second option.
Can anyone tell me this was the right way ?
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" {
│
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.104.2"
}
}
}
provider "azurerm" {
subscription_id = "xxxxxxxxxx"
tenant_id = "xxxxxxxxxx"
client_id = "xxxxxxxxxx"
client_secret = "xxxxxxxxxx"
features {}
}
resource "azurerm_resource_group" "appgrp" {
name = "app-grp"
location = "Central India"
}
Community Center Not monitored
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more