You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,184 +4,97 @@ description: This document describes how to deploy Azure Health Data Services us
4
4
author: chachachachami
5
5
ms.service: azure-health-data-services
6
6
ms.subservice: fhir
7
-
ms.topic: quickstart
8
-
ms.date: 02/25/2026
7
+
ms.topic: quickstart-bicep
8
+
ms.date: 03/11/2026
9
9
ms.author: chrupa
10
+
ms.reviewer: v-catheribun
10
11
ms.custom:
11
12
- mode-api
12
13
- devx-track-bicep
13
14
- build-2025
15
+
- subject-bicepqs
14
16
---
15
17
16
-
# Deploy Azure Health Data Services using Azure Bicep
18
+
# Quickstart: Deploy Azure Health Data Service with Bicep
17
19
18
-
In this article, you learn how to create Azure Health Data Services, including workspaces, Fast Healthcare Interoperability Resources (FHIR) services, and Digital Imaging Communications in Medicine (DICOM) services, using Azure Bicep.
20
+
In this quickstart, you use a Bicep file to create an Azure Health Data Services workspace with a Fast Healthcare Interoperability Resources (FHIR) service and a Digital Imaging Communications in Medicine (DICOM) service.
Bicep is built on top of Azure Resource Manager (ARM) template. Bicep immediately supports all preview and generally available (GA) versions for Azure services, including Azure Health Data Services. For more information on Bicep, see [What is Bicep](../azure-resource-manager/bicep/overview.md).
24
+
## Prerequisites
23
25
26
+
An Azure subscription. If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn).
24
27
25
-
During development, you can generate a JSON ARM template file using the `az bicep build` command. Conversely, you can decompile a JSON ARM template file to Bicep using the `az bicep decompile` command. During deployment, the Bicep CLI converts a Bicep file into an ARM template JSON.
You can continue to work with JSON ARM templates, or use Bicep to develop your ARM templates.
30
+
## Review the Bicep file
28
31
29
-
>[!Note]
30
-
>The templates and scripts in the article are tested in Visual Studio Code during the public preview. Some changes may be necessary to adapt the code to run in your environment.
32
+
The Bicep file used in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/<template-name>).
31
33
32
-
## Define parameters and variables
33
34
34
-
In this example, create a Bicep template file named `ahds.bicep` Using Bicep parameters and variables instead of hard coding names and other values allows you to debug and reuse your Bicep files. They’re used when you run the template in the CLI command line with the "--parameters" option.
First, define parameters with the keyword *param* for workspace and the services you want to deploy. Also, define parameters for Azure subscription and Microsoft Entra tenant.
37
+
The Bicep file defines three Azure resources.
37
38
38
-
Then define variables for resources with the keyword *var*. Also, if you're deploying a FHIR service, define variables for properties such as the authority and the audience. They’re specified and used internally in the Bicep file and can be used in combination of parameters, Bicep functions, and other variables. Unlike parameters, they aren’t used in the CLI command line.
It's important to note that one Bicep function and environment are required to specify the login URL, `https://login.microsoftonline.com`. For more information on Bicep functions, see [Deployment functions for Bicep](../azure-resource-manager/bicep/bicep-functions-deployment.md#environment).
41
43
42
-
```
43
-
//Define parameters
44
-
param workspaceName string
45
-
param fhirName string
46
-
param dicomName string
47
-
param tenantId string
48
-
param location string
49
-
50
-
//Define variables
51
-
var fhirservicename = '${workspaceName}/${fhirName}'
52
-
var dicomservicename = '${workspaceName}/${dicomName}'
53
-
54
-
var loginURL = environment().authentication.loginEndpoint
55
-
var authority = '${loginURL}${tenantId}'
56
-
var audience = 'https://${workspaceName}-${fhirName}.fhir.azurehealthcareapis.com'
57
-
```
58
-
59
-
## Create a workspace template
60
-
61
-
To define a resource, use the keyword *resource*. For the workspace resource, the required properties include the workspace name and location. In the template, the location of the resource group is used, but you can specify a different value for the location. For the resource name, you can reference the defined parameter or variable.
62
-
63
-
For more information on resource and module, see [Resource declaration in Bicep](../azure-resource-manager/bicep/resource-declaration.md).
To use or reference an existing workspace without creating one, use the keyword *existing*. Specify the workspace resource name and the existing workspace instance name for the name property. A different name for the existing workspace resource is used in the template, but that isn't a requirement.
You're now ready to deploy the workspace resource using the `az deployment group create` command. You can also deploy it along with its other resources, as described further in this article.
83
-
84
-
For more information about workspace templates, see [Microsoft.HealthcareApis workspaces](/azure/templates/microsoft.healthcareapis/workspaces)
47
+
You can deploy the Bicep file by using Azure CLI or Azure PowerShell. This example uses Azure CLI in Bash.
85
48
86
-
## Create a FHIR service template
49
+
1. Save your Bicep file locally as `main.bicep`
50
+
1. Open a Bash shell and go to the directory where you saved the Bicep file.
51
+
1. Run the following command to sign in to Azure from the CLI. Follow the prompts to complete the authentication process.
52
+
53
+
```azurecli
54
+
az login
55
+
```
56
+
1. Run the upgrade command to make sure you're running the latest version of Azure CLI.
87
57
88
-
For the FHIR service resource, the required properties include service instance name, location, kind, and managed identity. Also, it has a dependency on the workspace resource. For the FHIR service itself, the required properties include authority and audience, which are specified in the properties element.
az group create --name <resource group name> --location westus2
120
68
```
121
69
122
-
For more information about FHIR service templates, see [Microsoft.HealthcareApis workspaces/fhirservices](/azure/templates/microsoft.healthcareapis/workspaces/fhirservices)
70
+
## Deploy resources
123
71
124
-
## Create a DICOM service template
72
+
Use the [az deployment group create](/cli/azure/deployment/group#az-deployment-group-create) command to deploy your resources. Replace the `<placeholders>` with your values.
125
73
126
-
For the DICOM service resource, the required properties include service instance name and location, and the dependency on the workspace resource type.
74
+
```azurecli
75
+
az deployment group create --resource-group <resource group name> --template-file main.bicep
For more information about DICOM service templates, see [Microsoft.HealthcareApis workspaces/dicomservices](/azure/templates/microsoft.healthcareapis/workspaces/dicomservices)[!INCLUDE [FHIR and DICOM trademark statement](./includes/healthcare-apis-fhir-dicom-trademark.md)]
79
+
The output of this command is a JSON-formatted listing of the deployment. You can view and manage these resources through the [az healthcareapis workspace](/cli/azure/healthcareapis/workspace) commands.
150
80
81
+
## Debug Bicep files
151
82
83
+
You can debug Bicep files in Visual Studio Code or in other environments. Troubleshoot issues based on the response. You can also review the activity log for a specific resource in the resource group while debugging.
152
84
153
-
## Deploy Azure Health Data Services
154
-
155
-
You can use the `az deployment group create` command to deploy individual Bicep file or combined templates, similar to the way you deploy Azure resources with JSON templates. Specify the resource group name, and include the parameters in the command line. With the "--parameters" option, specify the parameter and value pair as "parameter = value", and separate the parameter and value pairs by a space if more than one parameter is defined.
156
-
157
-
For the Azure subscription and tenant, you can specify the values, or use CLI commands to obtain them from the current sign-in session.
85
+
In addition, you can use the **output** value for debugging or as part of the deployment response. For example, you can define two output values to display the values of authority and audience for the FHIR service in the response. For more information, see [Outputs in Bicep](../azure-resource-manager/bicep/outputs.md).
158
86
159
87
```
160
-
deploymentname=xxx
161
-
resourcegroupname=rg-$deploymentname
162
-
location=centralus
163
-
workspacename=ws$deploymentname
164
-
fhirname=fhir$deploymentname
165
-
dicomname=dicom$deploymentname
166
-
bicepfilename=ahds.bicep
167
-
subscriptionid=$(az account show --query id --output tsv)
168
-
tenantid=$(az account show --subscription $subscriptionid --query tenantId --output tsv)
169
-
170
-
az group create --name $resourcegroupname --location $location
171
-
az deployment group create --resource-group $resourcegroupname --template-file $bicepfilename --parameters workspaceName=$workspacename fhirName=$fhirname dicomName=$dicomname tenantId=$tenantid location=$location
88
+
output stringOutput1 string = authority
89
+
output stringOutput2 string = audience
172
90
```
173
91
174
-
The child resource name such as the FHIR service includes the parent resource name, and the "dependsOn" property is required. However, when the child resource is created within the parent resource, its name doesn't need to include the parent resource name, and the "dependsOn" property isn't required. For more info on nested resources, see [Set name and type for child resources in Bicep](../azure-resource-manager/bicep/child-resource-name-type.md).
175
-
176
-
## Debugging Bicep files
92
+
## Clean up resources
177
93
178
-
You can debug Bicep files in Visual Studio Code, or in other environments and troubleshoot issues based on the response. Also, you can review the activity log for a specific resource in the resource group while debugging.
179
-
180
-
In addition, you can use the **output** value for debugging or as part of the deployment response. For example, you can define two output values to display the values of authority and audience for the FHIR service in the response. For more information, see [Outputs in Bicep](../azure-resource-manager/bicep/outputs.md).
94
+
When you're finished with the resources you created, delete the resource group. Deleting the resource group deletes all the resources created in this exercise. To delete the resource group, run the [az group delete](/cli/azure/group#az-group-delete) command. Replace the `<placeholders>` with your values.
181
95
182
-
```
183
-
output stringOutput1 string = authority
184
-
output stringOutput2 string = audience
96
+
```azurecli
97
+
az group delete --resource-group <resource group name>
0 commit comments