Fix: Azure Cosmos DB Account Name Already Taken
Fix Azure Cosmos DB global name conflicts in Terraform. Handle unique naming, DNS resolution, and account restoration after soft deletion.
Troubleshooting
Fix Azure Container Registry SKU errors in Terraform. Covers feature availability per tier, geo-replication, private endpoints, and in-place upgrades.
The feature you're trying to use requires a higher ACR SKU tier. Upgrade from Basic to Standard or Premium — geo-replication, private endpoints, and content trust all require Premium SKU.
Error: creating/updating Container Registry "myacr":
SkuUpgradeRequired: The registry SKU 'Basic' doesn't support
geo-replications. Please upgrade to 'Premium'.Error: Private endpoints are only available for Premium SKU registries.Using a feature that's restricted to a higher SKU tier. ACR has three tiers with different capabilities.
| Feature | Basic | Standard | Premium |
|---|---|---|---|
| Storage | 10 GB | 100 GB | 500 GB |
| Geo-replication | ❌ | ❌ | ✅ |
| Private endpoints | ❌ | ❌ | ✅ |
| Content trust | ❌ | ❌ | ✅ |
| Customer-managed keys | ❌ | ❌ | ✅ |
| Webhooks | 2 | 10 | 500 |
| Price (approx/month) | $5 | $20 | $50 |
resource "azurerm_container_registry" "main" {
name = "myappacr${var.environment}"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
sku = "Premium" # Upgrade from Basic/Standard
admin_enabled = false
# Now you can use Premium features
georeplications {
location = "West Europe"
}
}resource "azurerm_container_registry" "main" {
name = "myappacr${var.environment}"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
sku = "Premium"
public_network_access_enabled = false
}
resource "azurerm_private_endpoint" "acr" {
name = "acr-pe"
location = azurerm_resource_group.main.location
resource_group_name = azurerm_resource_group.main.name
subnet_id = azurerm_subnet.endpoints.id
private_service_connection {
name = "acr-psc"
private_connection_resource_id = azurerm_container_registry.main.id
subresource_names = ["registry"]
is_manual_connection = false
}
}variable "acr_sku" {
type = map(string)
default = {
dev = "Basic"
staging = "Standard"
prod = "Premium"
}
}
resource "azurerm_container_registry" "main" {
name = "myappacr${var.environment}"
resource_group_name = azurerm_resource_group.main.name
location = azurerm_resource_group.main.location
sku = var.acr_sku[var.environment]
}az acr show --name myacr --query sku.name)ACR SKU errors mean you're using a feature that requires a higher tier. Geo-replication, private endpoints, and content trust all need Premium. Upgrades are in-place — just change the sku field in your Terraform config. Use different SKUs per environment to optimize costs.
Fix Azure Cosmos DB global name conflicts in Terraform. Handle unique naming, DNS resolution, and account restoration after soft deletion.
Fix Azure AKS service principal errors in Terraform. Covers expired credentials, managed identity migration, RBAC configuration, and SP recreation.
Fix Azure subnet in use errors when modifying VNets in Terraform. Covers resource dependencies, NSG dissociation, delegation conflicts, and force deletion.
Resolve Azure resource group not found errors in Terraform. Fix subscription context, naming issues, and dependency ordering for Azure deployments.