Announcing my new book Terraform Cookbook

I am pleased to announce the official publication of my new book focused to Terraform called Terraform Cookbook.

In this book which is in a cookbook format you will learn mainly through many recipes to:

  • Installing Terraform
  • Writing Terraform configuration
  • Using Terraform’s command lines
  • Creating and use Terraform modules
  • Using Terraform for Azure provisioning
  • Testing the Terraform code
  • Integrating Terraform into a pipeline CI/CD with Azure DevOps or GitHub Action
  • Using Terraform Cloud

Read more

Installing Terraform on Linux

HashiCorp has recently announced in this blog post the possibility to download their tools (Terraform, Packer, Consul, …) via a classical and official Linux packages manager.

In this blog post, I expose how to use this repository for download the Terraform binary on Linux operating system.

Read more

Get list of Azure VM IP addresses based on tags

In my recent client I had a feature to get the list of private IP addresses of Azure virtual machines based on theirs tags.

For apply this I used the Azure cli tools and execute this command

az vm list-ip-addresses --ids $(az resource list --query "[?type=='Microsoft.Compute/virtualMachines' && tags.ENV == 'DEV'].id" --output tsv) --query "[][0]" | jq -r @csv

Read more

Create a private Azure Pipeline Agent using Packer, Terraform and Ansible

In this article I present how I build my private Azure pipeline agent in Azure based on Packer script provided by Microsoft that it’s use for build the Hosted Azure pipeline agent.

For build my private agent I do that in 4 steps:

  1. Create an image (VHD format) with Packer script provided by Microsoft
  2. Use this VHD for create a custom VM image with Terraform
  3. Provision a new Azure DevOps Pipeline Agent VM with Terraform
  4. Install and Configure the Azure DevOps Pipeline Agent with Ansible

Read more