DevOps is a journey not a destination. Implementing Infrastructure-as-Code is one of the first steps you will need to take!
When implementing an application environment in the cloud, it is important to have a repeatable way to deploy the underlying infrastructure components as well as your software into the target environment. This includes resources such as:
- Virtual Networks, Network Security Groups (Firewalls), Public IPs, Virtual Machines, Storage (Disks)
- PaaS Services (Azure Container Apps, Azure SQL, App Service, etc)
- Configuration Management (installing & configuring software on VMs)
The best way to make deployments repeatable is to define them with code, hence the term "Infrastructure as Code" (aka IAC). There are multiple technologies that enable you to achieve this. Some of these include:
- ARM Templates
- Bicep Templates
- HashiCorp's Terraform
- Ansible, Chef, Puppet, Salt Stack, and others
This hack is focused on using Terraform to implement your IaC.
This hack will help you learn:
- How Terraform can be used to deploy Azure infrastructure
The challenges build upon each other incrementally. You will start by creating basic Terraform manifests to get you familiar with the tools & syntax. Then you extend your manifests incrementally to deploy multiple infrastructure resources to Azure.
- Challenge 0: Pre-Requisites - Ready, Set, Go!
- Prepare your workstation to work with Azure & Terraform
- Challenge 1: Basic Terraform
- Develop a simple Terraform manifest that takes inputs to create an Azure Storage Account, and returns outputs
- Challenge 2: Terraform expressions and referencing resources
- Learn Terraform expressions, conditionals, and referencing resources
- Challenge 3: Advanced resource declarations
- Advanced resource declarations including iteration
- Challenge 4: Secret Values with Azure Key Vault
- Create and reference an Azure Key Vault
- Challenge 5: Deploy a Virtual Machine
- Create a complex deployment with multiple dependencies
- Challenge 6: Terraform Modules
- Learn how create reusable modules for granular resource management
- Challenge 7: Azure Container Apps (ACA)
- Create an ACA environment and deploy a simple
hello world
application to it
- Create an ACA environment and deploy a simple
- Challenge 8: Advanced ACA
- Provision an Azure container registry, import images to it, then provision and deploy a multi-microservice (frontend and backend) containerized application
You will want to prepare your machine with the following to help complete the Challenges for this hack:
- Azure Subscription
- optional Windows Subsystem for Linux (Windows 10-only)
- Azure CLI
- Visual Studio Code
../Student
- Terraform challenges
../Student/Resources
- Shell scripts needed to complete the challenges