Wednesday, September 11, 2024

Enabling Manual Triggers for Azure DevOps Pipeline Stages

Azure DevOps pipeline stages now support manual triggers, allowing for more flexibility. There are situations where some stages of a pipeline should run automatically, while others may require manual intervention. This blog explains how to configure a manual trigger for Azure DevOps pipeline stages.

Pre-requisites: Azure DevOps YAML Pipeline

To enable a manual trigger for a specific stage, include the trigger: manual option in the pipeline's YAML definition. Below is an example pipeline demonstrating how to configure a manual trigger for a stage.

Sunday, September 8, 2024

Advanced Input Variable Validation with Terraform

Terraform provides a variable validation feature that allows defining conditions to validate variable inputs. Previously, variable validation only allowed validating the input of the variable itself. However, starting with Terraform 1.9, this feature has been enhanced to allow the addition of validation conditions that reference other input variables and objects. This blog presents a simple example that explains how to add a condition to one variable that references another variable.

Pre-requites: Terraform 1.9 or greater

The following sample script is used to create two Azure resource groups. One in the West Europe region and the other in the East US region. The two resource groups should not be created in the same region.

Tuesday, August 6, 2024

Ensuring Outbound Rules of Azure App Service

In situations where Azure App Service is configured with network protection, it is crucial to know which systems and applications have access to the App Service, and which applications and systems can be accessed from the App Service (outbound). This blog explains a simple but useful trick that can be used to check the outbound rules of the App Service.

Prerequisites: Azure App Service with restricted internet access

Saturday, July 27, 2024

How to Reset Azure VM Password for Domain Controller

This blog explains how to reset the Azure domain controller VM's password when the local administrator password expires.

Pre-requites: Azure VM as a domain controller and expired local administrator password

Resetting the Azure VM password using the "Reset password" option under the Help in the Service menu will give the following error. "VMAccess Extension does not support Domain Controller." The solution is to use the Run Command to reset the local administrator password.

Sunday, June 30, 2024

Promote Azure Snapshot with Azure CLI

Azure Storage account blobs facilitate versioning through two mechanisms, blob versioning and blob snapshots. Blob versioning creates a new version with each edit, while blob snapshots allow you to take a snapshot of the current blob and make changes to it. Both mechanisms enable users to revert to a previous version or a created snapshot if needed and recover the data.

This blog explains how to revert to a blob snapshot using an automated script.

Prerequisite: Azure DevOps blob

Sunday, May 26, 2024

Run YAML Pipeline Stages Based on Dynamic Variable Values

YAML pipeline conditions can be utilized to generate pipelines that meet various criteria, such as dependencies between stages and determining whether a stage should be run or not. In this blog post, we will learn how to run stages based on dynamically generated variables.

Pre-requisites: Azure DevOps Account

Monday, May 20, 2024

Share Dynamic Variables Between Azure DevOps Stages

This blog post explains how to generate dynamic variables while running Azure DevOps tasks and how to utilize them in subsequent tasks in dependent stage.

Prerequisites: Azure DevOps account

The following YAML pipeline consist with two stages called GenerateGuid and PrintGUID

1. Two GUIDs are generated within Job1 in GenerateGuid stage and are designated as output variables using the script below. 'demovariable01' is the dynamic variable name.           

Wednesday, April 17, 2024

Utilize Deployment Group Job in YAML Pipeline

Azure DevOps deployment pipelines offer three types of jobs: agent job, deployment group job, and agentless job. However, YAML pipelines require an alternative approach as they lack direct support for deployment group jobs. Virtual machine resources in environments are utilized to achieve similar functionality as deployment groups, and this blog explains how to do it.

Prerequisites:

  • Azure DevOps environment provisioned with virtual machine resources.
  • Fundamental understanding of pipeline configuration

As a prerequisite, an environment called Test-dev has been provisioned and a virtual machine has been added to it.

Sunday, March 31, 2024

Bringing Role Assignments into Terraform State Management

Terraform is an infrastructure automation tool that keeps track of the state of your infrastructure managed by Terraform in a state file. It serves as a snapshot of the actual infrastructure. Therefore, Keeping Terraform state file up to date is crucial. If a new resource added or any manual changes are made to the actual resource, it is important to import those changes into the state file. This blog explains how to import manually added role assignment to the terraform state file.

Pre-requisites: Manually add User Access Administrator Role to the Azure resource group.

Friday, February 23, 2024

Customizing Next.js Port Configuration

Next.js is a React Web development Framework that is particularly popular among frontend developers. This blog will share small but useful tip for Next.js users.

By default, Next.js utilize port 3000. However, if the port is already allocated to another service, it's possible to change the port used by of Next.js to different one. Following is a step-by-step guide on how to change the default port of a Next.js project.

Prerequisites: Next.js project

Saturday, February 3, 2024

Share Dynamic Variables Between Azure DevOps Jobs

Azure DevOps pipelines can be defined with multiple jobs based on the final result to be achieved and specific requirements. There may arise situations where variable values need to be dynamically generated within one pipeline job and utilized in another subsequent job. This blog explains the process of achieving such functionality.

Prerequisites: Azure DevOps account

Sunday, January 21, 2024

Multi configuration build with GitHub Action Matrices

Testing is a crucial part of software development, and there are several kinds of testing performed by software development teams. Configuration testing is one type of testing that verifies the performance of a system under different configurations. This blog explains how to use GitHub Actions Matrices to build the code with different configurations.

GitHub actions matrices allow to use of variables in a single job definition to create multiple jobs with different configurations.