Preview Image

How to write your first AVM resource module

This is a post about writing your first Azure Verified Modules, for those interested in the background about AVM, check out this recent intro on YouTube. This is recommended as a learning exercise to familiarise yourself with AVM. I strongly encourage contributing to the official resource modules Microsoft is in the process of building. We’re going to focus on writing a resource module: It is recommended to use a unix-based system for writing AVM modules (e.g. either WSL2, a Mac, a Linux variant, or GitHub codespaces).

Preview Image

Use the "newres" cli to make Terraform modules faster.

newres is a command line utility that helps you write Terraform modules faster. It supports multiple cloud providers (e.g. azure, aws, gcp), and several other providers too (e.g. kubernetes & tls). Usage To use, is as easy as: 1 newres -dir [DIRECTORY] [-u] [-r RESOURCE_TYPE] …e.g. for an Azure Resource Group: 1 newres -dir ./ -r azurerm_resource_group This will create the ‘main.tf’ and ‘variables.tf’ covering the arguments from the schema documentation. The example screenshot below shows the start of main.tf for a cognitive services account resource, illustrating the coverage and the use of dynamics for optional blocks.

Preview Image

Privacy matters

Privacy is normal Privacy is for good guys. It’s for mums and bike messengers and foodies. Privacy is for business meetings and voting booths. It’s why we have shower curtains. It’s why we have that little padlock icon in our browser bar. Privacy protects you from discrimination and from identity theft, and it keeps your food-delivery history under wraps. It can also shield you from those creepy somebody-has-definitely-been-listening-to-my-thoughts ads on social media apps.

Preview Image

Azure Verified Modules

Azure Verified Modules is an initiative in development from Microsoft that seeks to unify many previous attempts to standardarise Infrastructure as Code modules on the Azure platform. The initiative aims to establish strategy, governance, and create a brand that becomes the go to place for resources & patterns, currently targeting Bicep and Terraform. Microsoft’s aim is to “consolidate and set the standards for what a good Infrastructure-as-Code module looks like”, following the principles of the Well Architected Framework, evolving existing efforts such as the CARML library for Bicep resources.

Preview Image

Use an alias in your PowerShell profile to create a new Hugo post

The command to create a new Hugo post is: 1 hugo new <path to new content> Use an alias Using Powershell, you can use an alias to make this easier, here is the block of code we are going to use: 1 2 3 4 5 6 7 8 9 10 11 12 13 function New-HugoPost { param ( [string]$PostName ) # UPDATE ME TO POINT TO YOUR BLOG PATH $blogPath = "c:\path\to\your\blog" set-location $blogPath & hugo.exe new "content\post\$PostName\index.md" -c $blogPath } Set-Alias nhp New-HugoPost This can be reloaded each time Powershell starts by editing your profile: