I had a new Azure account created and subscription id set in the Azure Portal. Literally everything else is void on this account.
TF version 1.12.2
In .tf file i have only the provider block.
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=4.1.0"
}
}
}
provider “azurerm” {
features {}
}
TF plan command started and keeps going in multiple API calls with Azure. I was able to monitor it in the debug mode.
As with any Azure, only few providers are registered by default. With this command im noticing the terraform is REGISTERING a whole slew of other Microsoft resources and continues until i cancel out the terraform plan.
az provider list --query “[?registrationState==‘Registered’].[namespace]” -o table
Qs -
-
Why is this behavior happening? I dont want any providers other than what im intending to use to move from UnRegistered to Registered state.
-
how to restrict any activity in my terraform to only to a specific region? eg. im intending to use this snippet. But the resource provider is registering all other resources in all other regions.
resource “azurerm_resource_group” “rg” {
name = “my-rg-2”
location = “East US”
}
Apart from the registered by default, tf plan registered these resources as well. I had to cancel the tf plan and unregister these resources individually from az cli.
Microsoft.Databricks
Microsoft.Management
Microsoft.NotificationHubs
Microsoft.DataLakeStore
Microsoft.DocumentDB
Microsoft.SignalRService
Microsoft.Security
Microsoft.Search
Microsoft.Maps
Microsoft.AppConfiguration
Microsoft.EventHub
Microsoft.EventGrid
Microsoft.DataFactory
Microsoft.GuestConfiguration
Microsoft.SecurityInsights
microsoft.insights
Microsoft.Blueprint
Microsoft.DBforMariaDB
Microsoft.Cdn
Microsoft.MixedReality
Microsoft.ManagedServices
Microsoft.Cache
Microsoft.ServiceBus
Microsoft.HDInsight
Microsoft.ContainerInstance
Microsoft.OperationalInsights
Microsoft.Web
Microsoft.DevTestLab
Microsoft.DataMigration
Microsoft.DataLakeAnalytics
Microsoft.DBforPostgreSQL
Microsoft.Devices
Microsoft.CloudShell
Microsoft.ManagedIdentity
Microsoft.DataProtection
Microsoft.Maintenance
Microsoft.BotService
Microsoft.AppPlatform
Microsoft.CognitiveServices
Microsoft.OperationsManagement
Microsoft.HealthcareApis
Microsoft.Storage
Microsoft.CustomProviders
Microsoft.DBforMySQL
Microsoft.PowerBIDedicated
Microsoft.DesktopVirtualization
Microsoft.ContainerService
Microsoft.AVS
Microsoft.StreamAnalytics
Microsoft.Logic
Microsoft.KeyVault
Microsoft.ServiceFabric
Microsoft.ContainerRegistry
Microsoft.RecoveryServices
Microsoft.MachineLearningServices
Microsoft.Network
Microsoft.Kusto
Microsoft.ApiManagement
Microsoft.Automation
Microsoft.Relay
Microsoft.PolicyInsights
Microsoft.ChangeSafety
Microsoft.ResourceNotifications