Getting polling after CreateOrUpdate: `result.Status` was nil/empty - `op.Status` was "Requested" / `op.Properties.ProvisioningState` was "" when creating FHIR service using terraform.

Devanshu Soni 0 Reputation points
2026-01-28T09:20:10.6566667+00:00

Getting again and again polling after CreateOrUpdate: result.Status was nil/empty - op.Status was "Requested" / op.Properties.ProvisioningState was "". I am creating FHIR service using terraform.

Azure Health Data Services
Azure Health Data Services

An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.

0 comments No comments

2 answers

Sort by: Newest
  1. Praveen Kumar Gudipudi 2,295 Reputation points Microsoft External Staff Moderator
    2026-01-28T11:11:06.7033333+00:00

    Hello Devanshu Soni,

    Azure Health Data Services FHIR ARM API does not consistently return a terminal async-operation state, causing Terraform polling to never complete.

    Please run below script:

    az healthcareapis service show \

    --resource-group <rg> \

    --workspace-name <workspace> \

    --name <fhir-name>

    If it shows provisioningState: Succeeded, then end point reachable.

    Some fixes landed in newer versions.

    provider "azurerm" {
      features {}
    }
    
    terraform {
      required_providers {
        azurerm = {
          source  = "hashicorp/azurerm"
          version = ">= 3.90.0"
        }
      }
    }
    

    If you’re already on latest → move on.


    2. Force timeouts (most reliable workaround)

    resource "azurerm_healthcare_fhir_service" "fhir" {
      name                = var.name
      workspace_id        = azurerm_healthcare_workspace.ws.id
      location            = var.location
      resource_group_name = var.rg
    
      kind = "fhir-R4"
    
      authentication {
        authority = "https://login.microsoftonline.com/${data.azurerm_client_config.current.tenant_id}"
        audience  = "https://${var.name}.azurehealthcareapis.com"
      }
    
      timeouts {
        create = "90m"
        update = "90m"
        delete = "90m"
      }
    }
    

    This doesn’t fix the root cause but prevents premature failure.


    3. Use ignore_changes on non-critical fields

    Sometimes Terraform re-enters polling because Azure mutates fields post-creation.

    lifecycle {
      ignore_changes = [
        tags,
        identity,
      ]
    }
    
    
    
    1. terraform apply

    wait for Azure portal to show Succeeded

    terraform import azurerm_healthcare_fhir_service.fhir <resource-id>

    Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.

    User's image

    Was this answer helpful?


  2. AI answer

    2026-01-28T09:20:19.5633333+00:00

    When creating a FHIR service using Terraform, encountering a situation where result.Status is nil or empty and op.Status is "Requested" with op.Properties.ProvisioningState being empty can indicate that the provisioning operation is still in progress or has not yet completed. This is common in asynchronous operations where the status may not be immediately available after the request is made.

    To troubleshoot this issue:

    1. Check the Azure Portal: Look at the Azure portal for the FHIR service to see if there are any errors or if the service is still being provisioned.
    2. Increase Polling Interval: If you're polling for the status too frequently, consider increasing the interval to allow more time for the operation to complete.
    3. Review Terraform Logs: Check the Terraform logs for any additional error messages or warnings that might give more context about the operation's status.
    4. Provisioning State Values: Familiarize yourself with the possible values of ProvisioningState, which can include states like 'Updating', 'Succeeded', 'Failed', and 'Canceled'. If the state remains empty for an extended period, it may indicate a problem with the provisioning process.

    If the issue persists, consider reaching out to Azure support for further assistance.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.