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

ARM_OIDC_TOKEN_FILE_PATH not recognised while running on AKS cluster #20671

Closed
1 task done
maciekdude opened this issue Feb 27, 2023 · 2 comments
Closed
1 task done

Comments

@maciekdude
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • 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 "+1" or "me too" comments, 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

Terraform Version

1.3.7

AzureRM Provider Version

3.45.0

Affected Resource(s)/Data Source(s)

authorization OIDC

Terraform Configuration Files

ARM_CLIENT_ID=xxxx
ARM_OIDC_TOKEN_FILE_PATH=/var/run/secrets/azure/tokens/azure-identity-token
ARM_TENANT_ID=xxx
ARM_USE_OIDC=true
ARM_SUBSCRIPTION_ID=xxxxx

Debug Output/Panic Output

2023-02-27T13:26:12.906Z [ERROR] provider.terraform-provider-azurerm_v3.45.0_x5: Response contains error diagnostic: diagnostic_detail= diagnostic_severity=ERROR diagnostic_summary="unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: obtaining subscription ID: running Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account." tf_req_id=8a82e017-af6b-0804-557a-aecd40787094 @caller=github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/diag/diagnostics.go:55 @module=sdk.proto tf_provider_addr=provider tf_rpc=Configure tf_proto_version=5.3 timestamp=2023-02-27T13:26:12.906Z
2023-02-27T13:26:12.907Z [ERROR] vertex "module.dev.provider[\"registry.terraform.io/hashicorp/azurerm\"]" error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: obtaining subscription ID: running Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account.

│ Error: unable to build authorizer for Resource Manager API: could not configure AzureCli Authorizer: obtaining subscription ID: running Azure CLI: exit status 1: ERROR: Please run 'az login' to setup account.
│
│   with module.dev.provider["registry.terraform.io/hashicorp/azurerm"],
│   on ../provider.tf line 41, in provider "azurerm":
│   41: provider "azurerm" {
│
╵

Expected Behaviour

After upgrading to >=3.44.x ARM_OIDC_TOKEN_FILE_PATH is no longer recognized.
I am unable to auth using just ARM_OIDC_TOKEN_FILE_PATH env variable. Everything works as expected with 3.43.
Moreover, everything works when I setup ARM_OIDC_TOKEN explicitly.

Actual Behaviour

No response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

@maciekdude maciekdude added the bug label Feb 27, 2023
@github-actions github-actions bot removed the bug label Feb 27, 2023
@manicminer
Copy link
Contributor

Thanks for reporting this @maciekdude, this was fixed in v3.47.0. Apologies for the inconvenience, please upgrade your provider version and this should work again for you.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants