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”

Connect Azure MySQL to Private Endpoint with Terraform

To connect an Azure MySQL Database, or other services in Azure, one of the most secure methods to do this is with a Private Endpoint. Microsoft document the architecture they recommend using an App Service connecting to a MySQL Server, which is good if you are using the Azure Portal, but there are some missingContinueContinue reading “Connect Azure MySQL to Private Endpoint with Terraform”

Create User on Azure MySQL Database with Terraform

After you create you Azure MySQL Server, you would like to create a Database, but for security you would like to have a new custom user added with permission. Unfortunately the Azure Providers do not provide this, so we need to use some other skills to get these users in. First we can go aheadContinueContinue reading “Create User on Azure MySQL Database with Terraform”

Unable to delete Azure Subnet due to Resources

With Azure Subnets there is an order to deleting the resources. You must disconnect the Virtual Network Subnets before deleting the resources, or you can’t delete the Subnet. This caused myself some issue, while using Terraform as I kicked a Destroy command and did it in the wrong order. However, I found a method onContinueContinue reading “Unable to delete Azure Subnet due to Resources”

Automatic Change Checking on Pipeline Stages

Azure DevOps has the ability to add multiple stage approval styles like human intervention, Azure Monitoring and schedules. However, there is not the ability to value if a source has changed before triggering a Stage. This can be done on the Pipeline level, but not the Stage level where it can be helpful to haveContinueContinue reading “Automatic Change Checking on Pipeline Stages”

Auto Purge Azure Container Registry Images

When adding images into the Azure Container Registry you might start getting a backlog of images that need to be cleaned down. Azure CLI has some features, but you might want more… With the Azure CLI you can use the ‘ACR’ commands, which contain the option of ‘purge’. This can be combined with a tagContinueContinue reading “Auto Purge Azure Container Registry Images”

Automate Security for Azure Container Registry

From March 2021 Azure is deprecating the Container Setting in Azure Web Apps, which changes you to use the new Development Center. This look very nice, but there is a change that is going to force you to have weaker security. This change is to have the Admin Credentials enabled, but there is something youContinueContinue reading “Automate Security for Azure Container Registry”

Merge Azure DevOps Pipeline Templates

As mentioned in my previous post about Azure DevOps Local Pipeline Testing, the available method of testing with the Azure DevOps API doesn’t have the feature to merge the YAML Templates. Therefore, I have set out to try and solve this issue.. You can view the full PowerShell script on GitHub.(https://github.com/PureRandom/AzureDevOpsYamlMerge-ps) Please feel free toContinueContinue reading “Merge Azure DevOps Pipeline Templates”