An Azure offering that provides a suite of purpose-built technologies for protected health information in the cloud.
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.
1. Upgrade AzureRM provider (recommended)
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,
]
}
- 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.