Best Practices for Terraform Module Testing and Validation

Terraform Modules are great for isolated components you can reuse and plug-in to your main Infrastructure as Core code base. They can then also be shared and used by multiple other teams at the same time to reduce repeated code, complexity and increase compliance. However, as they are isolated, they are harder to test, maintainContinueContinue reading “Best Practices for Terraform Module Testing and Validation”

Azure DevOps REST API: Add Users and Set Administrators Easily

When using the Azure DevOps REST API to create Teams and add users, you may want to set the administrators as well at the same time. However, this REST API is not well documented on the Microsoft documentation site for the REST API. With some searching and mapping of resources, I have below the methodContinueContinue reading “Azure DevOps REST API: Add Users and Set Administrators Easily”

Shared Azure API Management Service Design

Azure API Management Services (APIM) are a powerful, flexible, and well-equipped product in Azure, but they are also expensive. There are reasons for this, and ways in general you can reduce the cost with SKUs, but another way is to share it with other products within your organisation instead of having a dedicated APIM. IContinueContinue reading “Shared Azure API Management Service Design”

How to get Azure Artifact Feed ID from user readable name

This is a simple post but with some affective content. Sometimes when using Azure DevOps YAML Pipelines you might need to interact with the Azure DevOps Artifacts and their Feeds. However, to do this you need to obtain the Feed ID, which is not obvious where it is and how to get it, especially duringContinueContinue reading “How to get Azure Artifact Feed ID from user readable name”

Automatic ACME SSL Certificate Rotation

Technology needs to be secure, but we also want to make it easy to use. This is the same for us engineers managing SSL Certificates and their rotation. You can get long life certificates, but why when you can get free ones generated via the Automated Certificate Management Environment (ACME protocol). This is normally dueContinueContinue reading “Automatic ACME SSL Certificate Rotation”

Azure DevOps loop a complex object

This is a subject that I have not found much or any documentation on, so I wanted to share what I did. When creating the parameters to pass into a Template it can get very long, plus when two arrays depend on each other it can get very complex, so ironically a complex object makesContinueContinue reading “Azure DevOps loop a complex object”

Bash compare version numbers

Here is a little script to help compare version numbers in the format X.X.X using bash/shell. This can be good if you are trying to find out which version is higher for something like an upgrade. versionlte() { [ “$1” = “`echo -e “$1\n$2″ | sort -V | head -n1`” ] } versionlt() { [ContinueContinue reading “Bash compare version numbers”

Terraform plan output to JSON

The Terraform CLI currently doesn’t output the plan to a human readable file when running the plan command. It currently prints to the console in a readable format, at least within Azure DevOps, but the tfplan file outputted is not. This can be very unhelpful within a deployment pipeline when you save the output fileContinueContinue reading “Terraform plan output to JSON”