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

terraform always asks for login if AZURE_CONFIG_DIR is different from the default #24193

Closed
rnsc opened this issue Feb 24, 2020 · 3 comments
Closed

Comments

@rnsc
Copy link

rnsc commented Feb 24, 2020

Terraform Version

Terraform v0.12.21

Terraform Configuration Files

# The default provider configuration
provider "azurerm" {
  subscription_id = "MySubscriptionId"
}

Crash Output

Error: Error building AzureRM Client: Error populating Client ID from the Azure CLI: No Authorization Tokens were found - please ensure the Azure CLI is installed and then log-in with `az login`.

Expected Behavior

Terraform should support the AZURE_CONFIG_DIR env var (which is supported by Azure CLI).

Actual Behavior

Terraform complains that I'm not logged in, even though I am.

Steps to Reproduce

Configure your env with the AZURE_CONFIG_DIR set to something other than "$HOME/.azure".
Do az login and confirm that the AZURE_CONFIG_DIR is populated with the Azure CLI session files.
Run terraform and it will complain that you need to login.

Additional Context

Azure CLI reference:
https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration?view=azure-cli-latest#cli-configuration-file

@ghost
Copy link

ghost commented Feb 25, 2020

This issue has been automatically migrated to hashicorp/terraform-provider-azurerm#5891 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-azurerm#5891.

@ghost
Copy link

ghost commented Feb 25, 2020

This issue has been automatically migrated to hashicorp/terraform-provider-azurerm#5892 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-azurerm#5892.

@ghost
Copy link

ghost commented Apr 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
This issue was closed.
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

2 participants