Skip to content

azurermHealthcareFhirService

Manages a Healthcare FHIR (Fast Healthcare Interoperability Resources) Service

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
  this,
  "example",
  {
    location: "West Europe",
    name: "example",
  }
);
const dataAzurermClientConfigCurrent =
  new azurerm.dataAzurermClientConfig.DataAzurermClientConfig(
    this,
    "current",
    {}
  );
const azurermHealthcareWorkspaceExample =
  new azurerm.healthcareWorkspace.HealthcareWorkspace(this, "example_2", {
    location: azurermResourceGroupExample.location,
    name: "example",
    resource_group_name: azurermResourceGroupExample.name,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermHealthcareWorkspaceExample.overrideLogicalId("example");
const azurermHealthcareFhirServiceExample =
  new azurerm.healthcareFhirService.HealthcareFhirService(this, "example_3", {
    access_policy_object_ids: [dataAzurermClientConfigCurrent.objectId],
    authentication: [
      {
        audience: "https://tfexfhir.fhir.azurehealthcareapis.com",
        authority: "https://login.microsoftonline.com/tenantId",
      },
    ],
    configuration_export_storage_account_name: "storage_account_name",
    container_registry_login_server_url: [
      "tfex-container_registry_login_server",
    ],
    cors: [
      {
        allowed_headers: ["*"],
        allowed_methods: ["GET", "DELETE", "PUT"],
        allowed_origins: ["https://tfex.com:123", "https://tfex1.com:3389"],
        credentials_allowed: true,
        max_age_in_seconds: 3600,
      },
    ],
    identity: [
      {
        type: "SystemAssigned",
      },
    ],
    kind: "fhir-R4",
    location: "east us",
    name: "tfexfhir",
    resource_group_name: "tfex-resource_group",
    workspace_id: azurermHealthcareWorkspaceExample.id,
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermHealthcareFhirServiceExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • name - (Required) Specifies the name of the Healthcare FHIR Service. Changing this forces a new Healthcare FHIR Service to be created.

  • resourceGroupName - (Required) Specifies the name of the Resource Group in which to create the Healthcare FHIR Service. Changing this forces a new resource to be created.

  • workspaceId - (Required) Specifies the id of the Healthcare Workspace where the Healthcare FHIR Service should exist. Changing this forces a new Healthcare FHIR Service to be created.

  • location - (Required) Specifies the Azure Region where the Healthcare FHIR Service should be created. Changing this forces a new Healthcare FHIR Service to be created.

  • kind - (Optional) Specifies the kind of the Healthcare FHIR Service. Possible values are: fhirStu3 and fhirR4. Defaults to fhirR4. Changing this forces a new Healthcare FHIR Service to be created.

  • identity - (Optional) An identity block as defined below.

  • accessPolicyObjectIds - (Optional) A list of the access policies of the service instance.

  • cors - (Optional) A cors block as defined below.

  • containerRegistryLoginServerUrl - (Optional) A list of azure container registry settings used for convert data operation of the service instance.

  • ociArtifact - (Optional) A list of objects describing OCI artifacts for export as defined below.

  • authentication - (Required) An authentication block as defined below.

  • configurationExportStorageAccountName - (Optional) Specifies the name of the storage account which the operation configuration information is exported to.

  • tags - (Optional) A mapping of tags to assign to the Healthcare FHIR Service.


An identity block supports the following:

  • type - (Required) The type of identity used for the Healthcare FHIR service. Possible values are systemAssigned.

A cors block supports the following:

  • allowedOrigins - (Required) A set of origins to be allowed via CORS.
  • allowedHeaders - (Required) A set of headers to be allowed via CORS.
  • allowedMethods - (Required) The methods to be allowed via CORS. Possible values are delete, get, head, merge, post, options and put.
  • maxAgeInSeconds - (Optional) The max age to be allowed via CORS.
  • credentialsAllowed - (Optional) If credentials are allowed via CORS.

An authentication block supports the following:

  • authority - (Required) The Azure Active Directory (tenant) that serves as the authentication authority to access the service. The default authority is the Directory defined in the authentication scheme in use when running Terraform. Authority must be registered to Azure AD and in the following format: https://{Azure-AD-endpoint}/{tenant-id}.
  • audience - (Required) The intended audience to receive authentication tokens for the service. The default value is https://<name>FhirAzurehealthcareapisCom.
  • smartProxyEnabled - (Optional) Whether smart proxy is enabled.

A ociArtifact block supports the following:

  • loginServer - (Required) An Azure container registry used for export operations of the service instance.

  • imageName - (Optional) An image within Azure container registry used for export operations of the service instance.

  • digest - (Optional) A digest of an image within Azure container registry used for export operations of the service instance to narrow the artifacts down.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Healthcare FHIR Service.

  • publicNetworkAccessEnabled - Whether public networks access is enabled.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 90 minutes) Used when creating the Healthcare FHIR Service.
  • update - (Defaults to 90 minutes) Used when updating the Healthcare FHIR Service.
  • read - (Defaults to 5 minutes) Used when retrieving the Healthcare FHIR Service.
  • delete - (Defaults to 30 minutes) Used when deleting the Healthcare FHIR Service.

Import

Healthcare FHIR Service can be imported using the resourceid, e.g.

terraform import azurerm_healthcare_fhir_service.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.HealthcareApis/workspaces/workspace1/fhirServices/service1