Solution skill
Azure Pipeline auth broken since CLI 3.104.0: use a dedicated service principal
Complete solution
Shows how to fix azure Pipeline auth broken since CLI 3.104.0: use a dedicated service principal. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
What was reported: Issue pulumi/pulumi#15786 (closed, 31 comments): Since the CLI version 3.104.0 (3.103.1 works fine), we are unable to run in our Azure pipeline.
Steps
- What was reported:
Issue pulumi/pulumi#15786 (closed, 31 comments): Since the CLI version 3.104.0 (3.103.1 works fine), we are unable to run in our Azure pipeline. Error: secrets (code=Unknown): DefaultAzureCredential authentication failed. GET the cloud provider's instance metadata endpoint returned 400 Bad Request.
- What works:
If pulumi fails in Azure Pipelines after upgrading past CLI 3.103.1, with DefaultAzureCredential errors against the instance metadata endpoint (the cloud provider's instance metadata endpoint), upstream go-cloud changed the credential behavior and will not revert it. The fix that worked in the thread: stop using the Azure DevOps ServiceConnection for Pulumi auth and create a dedicated service principal for Pulumi instead.
When to use
You are seeing this: Error: secrets (code=Unknown): DefaultAzureCredential authentication failed. Use this skill when you run into "Azure Pipeline auth broken since CLI 3.104.0: use a dedicated service principal".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 3.104.0, 3.103.1. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In the GitHub issue, the reporter asked: Azure Pipeline auth broken since CLI 3.104.0: use a dedicated service principal. The working answer that came out of the thread: If pulumi fails in Azure Pipelines after upgrading past CLI 3.103.1, with DefaultAzureCredential errors against the instance metadata endpoint (the cloud provider's instance metadata endpoint), upstream go-cloud changed the credential behavior and will not revert it. The fix that worked in the thread: stop using the Azure DevOps ServiceConnection for Pulumi auth and create a dedicated service principal for Pulumi instead. Source: https://github.com/pulumi/pulumi/issues/15786
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Gt77VdG618VEQn1YzvCdQQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Azure Pipeline auth broken since CLI 3.104.0: use a dedicated service principal <span>— Vectle</span></a>