[HOWTO] Fix “Server identity does not have Azure Active Directory Readers permission” error when using terraform local-exec provisioner to create SQL database users from external provider in a Az DevOps YAML pipeline

The author describes troubleshooting an Azure DevOps YAML pipeline error related to a local-exec provisioner in terraform, which failed to grant necessary permissions due to a missing Azure Active Directory Readers permission. They detail the root causes, error findings, and ultimately the adjustments made to resolve the issue, focusing on least privilege principles.

[HOWTO] Run ASP.NET Core integration tests in a Az DevOps YAML pipeline when subject under test uses DefaultAzureCredential

Last week I struggled (again) running ASP.NET Core integration tests for an ASP.NET Core Web API that uses DefaultAzureCredential in a Azure DevOps YAML pipeline. To avoid having to struggle again, I am writing down my findings here. The initial situation There was an existing ASP.NET Core (.NET 8) Web API project that uses DefaultAzureCredential... Continue Reading →

[HOWTO] Fix “Please run ‘az login’ to setup account” error caused by local-exec when executing terraform apply through TerraformCLI task in Azure DevOps pipeline

The Azure DevOps YAML pipeline encountered an error requiring 'az login' during a Terraform task due to a local-exec provisioner executing a PowerShell script that needed Azure CLI access. Despite this error, the pipeline completed successfully. Activating runAzLogin resolved the issue, enabling the script's changes to be applied effectively.

[HOWTO] Prevent self-hosted Azure DevOps agents from running out of disk space

The Azure DevOps pipeline, running on a self-hosted agent, failed due to insufficient disk space. Investigation revealed old directories consuming space. Enabling the maintenance job feature can automate cleaning to prevent such issues. It's advisable to schedule maintenance during low agent activity to avoid disruption. For detailed maintenance job information, refer to documentation.

Website Powered by WordPress.com.

Up ↑