![](https://johanvanneuville.com/wp-content/uploads/2021/12/EmilyMclaren_3-1628763750433-1.png)
Hello and welcome to part 2 of my AVD and Terraform deployment guide. In part 2 I’ll deploy the different AVD modules using a release pipeline.
In this part I will use the assistant to create the pipeline. Al the code is in my DevOps.
To create a release pipeline click on Pipelines and Releases in the left blade.
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-76.png)
Click the down arrow and select New Release Pipeline
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-77.png)
In the next screen I select to start with an Empty Job
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-78-1024x433.png)
My first step is to Add an Artifact
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-79.png)
I select The source type (in my case Azure DevOps repo) and select the Source repository and default Branch and click on Add
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-80.png)
Now that we have our Artifact, it’s time to add the stages for the AVD deployment.
I need to create 3 Stages:
- AVD Hostpool
- AVD Storage
- AVD Shared Image Gallery
First I’m going to rename the first Stage to AVD Hostpool
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-81-1024x386.png)
After this I’m gonna add some tasks by clicking on the + icon
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-82.png)
First we need Terraform installed and also 3 times Terraform
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-84-1024x255.png)
The 3 times Terraform is for Terraform Init, Terraform Plan and Terraform Apply.
Terraform init
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-85.png)
Terraform Plan
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-86.png)
Terraform Apply
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-87.png)
Now the release pipeline looks like this.
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-88.png)
After these steps for the Hostpool are done, I’m gonna repeat them for the storage and for the Shared Image Gallery.
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-89-1024x346.png)
Running the pipeline
Now that it is creating let’s test it. Click on Create release and confirm with selecting Create
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-90-1024x272.png)
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-91.png)
The result after the pipeline has finished
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-92.png)
The result in the Azure portal. 4 resource groups have been created with all the components in there.
![](https://johanvanneuville.com/wp-content/uploads/2021/12/image-93.png)
When creating the pipeline like this I can very easy disable the storage step for example if I only need an extra hostpool.
I hope with reading this blogpost you learned something new about deploying AVD and side components using a release pipeline.