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.