-
Notifications
You must be signed in to change notification settings - Fork 77
Description
When i am creating the resource group using terraform apply, the code works fine and it creates resource group without any issue. but when i am running terraform apply again ( without making any changes in the code ) i am getting below error
module.lz-selfservice["sub-plm35-devtest"].azapi_resource.app-rg: Modifying... [id=/subscriptions/xxx/resourceGroups/plm35-app-rg]
╷
│ Error: Missing Resource Identity After Update
│
│ with module.lz-selfservice["sub-plm35-devtest"].azapi_resource.app-rg,
│ on ../modules/subscription/main.tf line 176, in resource "azapi_resource" "app-rg":
│ 176: resource "azapi_resource" "app-rg" {
│
│ The Terraform Provider unexpectedly returned no resource identity data
│ after having no errors in the resource update. This is always an issue in
│ the Terraform Provider and should be reported to the provider developers.
Below is the code i am using
resource "azapi_resource" "app-rg" {
type = "Microsoft.Resources/resourceGroups@2025-04-01"
depends_on = [ null_resource.register_subscription_provider]
location = var.location
name = var.app_rg_name
parent_id = "/subscriptions/${azurerm_subscription.subscription.subscription_id}"
schema_validation_enabled = false
#tags = var.tags
body = {tags = tomap({})}
lifecycle {
ignore_changes = [identity,
body.tags,
]
}
}
azapi = {
source = "Azure/azapi"
version = "2.8.0"
}