You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.
Hello, I've spent half a day figuring out how to authenticate using a Service Principal with OIDC. The documentation didn't help at all...
After I figured out the solution and came here to open this issue, I found this 1-year-old issue about the confusion on authenticating and this last comment on how to solve it with Github Actions. I implemented the same thing as they are suggesting here, but I only found this issue after understanding what the problem was.
Error building ARM Config: obtain subscription(***) from Azure CLI: parsing json result from the Azure CLI: waiting for the Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account.
Expected Behaviour
No response
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered:
Hello @rcskosir , I didn't see that one 😢... But anyway, I don't think this note is in the correct section. I would disregard it as being related to Azure Pipelines.
This is a general remark. Maybe a better location would be in a higher section, like under "Configuring the Service Principal in Terraform" and above "OIDC token".
Is there an existing issue for this?
Community Note
Hello, I've spent half a day figuring out how to authenticate using a Service Principal with OIDC. The documentation didn't help at all...
Target documentation page
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_oidc
It mentions the steps to configure the federated credentials through Azure Portal, but in the section on how to use these credentials it forgets to say we must set the backend with
use_oidc = true
or the environment variableARM_USE_OIDC: true
. This can be found in this other doc: Backend: Azure AD Service Principal or User Assigned Managed Identity via OIDC (Workload Identity Federation)After I figured out the solution and came here to open this issue, I found this 1-year-old issue about the confusion on authenticating and this last comment on how to solve it with Github Actions. I implemented the same thing as they are suggesting here, but I only found this issue after understanding what the problem was.
Suggestion
Please, add in the documentation below the following note in the
Github Actions
section:https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/service_principal_oidc#oidc-token
Terraform Version
1.9.6
AzureRM Provider Version
4.3.0
Affected Resource(s)/Data Source(s)
backend "azurerm"
Terraform Configuration Files
.
Debug Output/Panic Output
Expected Behaviour
No response
Actual Behaviour
No response
Steps to Reproduce
No response
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: