Skip to content

Commit 263e235

Browse files
committed
update ahds Bicep quickstart
1 parent bd381f2 commit 263e235

2 files changed

Lines changed: 49 additions & 136 deletions

File tree

articles/healthcare-apis/deploy-healthcare-apis-using-bicep.md

Lines changed: 48 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -4,184 +4,97 @@ description: This document describes how to deploy Azure Health Data Services us
44
author: chachachachami
55
ms.service: azure-health-data-services
66
ms.subservice: fhir
7-
ms.topic: quickstart
8-
ms.date: 02/25/2026
7+
ms.topic: quickstart-bicep
8+
ms.date: 03/11/2026
99
ms.author: chrupa
10+
ms.reviewer: v-catheribun
1011
ms.custom:
1112
- mode-api
1213
- devx-track-bicep
1314
- build-2025
15+
- subject-bicepqs
1416
---
1517

16-
# Deploy Azure Health Data Services using Azure Bicep
18+
# Quickstart: Deploy Azure Health Data Service with Bicep
1719

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.
1921

20-
## What is Azure Bicep
22+
[!INCLUDE [About Bicep](~/reusable-content/ce-skilling/azure/includes/resource-manager-quickstart-bicep-introduction.md)]
2123

22-
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
2325

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).
2427

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.
28+
[!INCLUDE [Azure CLI](~/reusable-content/azure-cli/azure-cli-prepare-your-enviornment-no-header.md)]
2629

27-
You can continue to work with JSON ARM templates, or use Bicep to develop your ARM templates.
30+
## Review the Bicep file
2831

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>).
3133

32-
## Define parameters and variables
3334

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.
35+
:::code language="bicep" source="~/quickstart-templates/<template-name>/main.bicep":::
3536

36-
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.
3738

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.
39+
- [Microsoft.HealthcareApis workspaces](/azure/templates/microsoft.healthcareapis/workspaces)
40+
- [Microsoft.HealthcareApis workspaces/fhirservices](/azure/templates/microsoft.healthcareapis/workspaces/fhirservices)
41+
- [Microsoft.HealthcareApis workspaces/dicomservices](/azure/templates/microsoft.healthcareapis/workspaces/dicomservices)
3942

40-
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).
4143

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).
64-
65-
```
66-
//Create a workspace
67-
resource exampleWorkspace 'Microsoft.HealthcareApis/workspaces@2021-06-01-preview' = {
68-
name: workspaceName
69-
location: resourceGroup().location
70-
}
71-
```
7244

73-
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.
45+
## Prepare your environment
7446

75-
```
76-
//Use an existing workspace
77-
resource exampleExistingWorkspace 'Microsoft.HealthcareApis/workspaces@2021-06-01-preview' existing = {
78-
name: workspaceName
79-
}
80-
```
81-
82-
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.
8548

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.
8757
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.
58+
```azurecli
59+
az upgrade
60+
```
8961
90-
```
91-
resource exampleFHIR 'Microsoft.HealthcareApis/workspaces/fhirservices@2021-11-01' = {
92-
name: fhirservicename
93-
location: resourceGroup().location
94-
kind: 'fhir-R4'
95-
identity: {
96-
type: 'SystemAssigned'
97-
}
98-
dependsOn: [
99-
exampleWorkspace
100-
//exampleExistingWorkspace
101-
]
102-
properties: {
103-
accessPolicies: []
104-
authenticationConfiguration: {
105-
authority: authority
106-
audience: audience
107-
smartProxyEnabled: false
108-
}
109-
}
110-
}
111-
```
62+
## Create resource group
11263
113-
Similarly, you can use or reference an existing FHIR service using the keyword *existing*.
64+
Use the [az group create](/cli/azure/group#az-group-create) command to create a resource group. Replace the `<placeholders>` with your values.
11465
115-
```
116-
//Use an existing FHIR service
117-
resource exampleExistingFHIR 'Microsoft.HealthcareApis/workspaces/fhirservices@2021-11-01' existing = {
118-
name: fhirservicename
119-
}
66+
```azurecli
67+
az group create --name <resource group name> --location westus2
12068
```
12169

122-
For more information about FHIR service templates, see [Microsoft.HealthcareApis workspaces/fhirservices](/azure/templates/microsoft.healthcareapis/workspaces/fhirservices)
70+
## Deploy resources
12371

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.
12573

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
12776
128-
```
129-
//Create DICOM service
130-
resource exampleDICOM 'Microsoft.HealthcareApis/workspaces/dicomservices@2021-11-01' = {
131-
name: dicomservicename
132-
location: resourceGroup().location
133-
dependsOn: [
134-
exampleWorkspace
135-
]
136-
properties: {}
137-
}
13877
```
13978

140-
Similarly, you can use or reference an existing DICOM service using the keyword *existing*.
141-
142-
```
143-
//Use an existing DICOM service
144-
resource exampleExistingDICOM 'Microsoft.HealthcareApis/workspaces/dicomservices@2021-11-01' existing = {
145-
name: dicomservicename
146-
}
147-
```
148-
149-
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.
15080

81+
## Debug Bicep files
15182

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.
15284

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).
15886

15987
```
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
17290
```
17391

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
17793

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.
18195

182-
```
183-
output stringOutput1 string = authority
184-
output stringOutput2 string = audience
96+
```azurecli
97+
az group delete --resource-group <resource group name>
18598
```
18699

187100
## Next steps

articles/healthcare-apis/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ items:
3535
href: health-data-services-get-started.md
3636
- name: Azure Health Data Services quickstart
3737
href: healthcare-apis-quickstart.md
38-
- name: Deploy services programmatically
38+
- name: Deploy services with Bicep
3939
href: deploy-healthcare-apis-using-bicep.md
4040
- name: How-tos
4141
expanded: true

0 commit comments

Comments
 (0)