Skip to content

Error: Missing Resource Identity After Update - resource group #1027

@bkainth1

Description

@bkainth1

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions