Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tasks seem to be unable to use new "Workload Identity Federation" Service Connections #34

Open
ncx-kevinCefalu opened this issue Feb 26, 2024 · 1 comment

Comments

@ncx-kevinCefalu
Copy link

Hi, I'm experiencing an issue with these tasks being unable to use Azure DevOps Workload Identity Federation service connections to any of our Azure subscriptions. The pipeline runs like normal, and as soon as one of the tasks are triggered, I receive the following message:
image

I've verified that the service connection id is correct. Once I swap to a different service principal, everything works as expected. I've also verified that other tasks in the same/other pipelines are able to use the newer service connection.

Any guidance on how this can be corrected would be greatly appreciated.

@riezebosch
Copy link
Owner

riezebosch commented Feb 26, 2024

I'm not sure, also have to look into that. Maybe you even have more success using the built-in AzureCLI task like this? That's something I lean towards anyway, since you don't have to use specific requirements for passing the credentials in your packer-file. But until recently packer was unable to use Service Principal credentials like that, if I'm correct.

Otherwise, I found some hints how to implement it here: https://github.com/microsoft/azure-pipelines-tasks/blob/5c92158ea309ecc460a6c58c7ba6f9d77367d31a/Tasks/AzureCLIV1/azureclitask.ts#L166-L180 🎉

And how to work with packer and OIDC here: https://www.hashicorp.com/blog/version-2-packer-azure-plugin-now-available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants