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

Azure CLI Parsing auth doesn't refresh the token #4

Closed
tombuildsstuff opened this issue Nov 19, 2018 · 0 comments · Fixed by #9
Closed

Azure CLI Parsing auth doesn't refresh the token #4

tombuildsstuff opened this issue Nov 19, 2018 · 0 comments · Fixed by #9

Comments

@tombuildsstuff
Copy link
Contributor

Migrating this over from hashicorp/terraform-provider-azurerm#502 where @jwendl opened the following issue:


Terraform requires az login after 30 minutes of in activity, even though az account list still works.

Terraform Version

Terraform v0.10.8

Affected Resource(s)

All

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "random_id" "server" {
  keepers = {
    azi_id = 1
  }

  byte_length = 8
}

resource "azurerm_resource_group" "test" {
    name = "resourceGroup1"
    location = "West Europe"
}

resource "azurerm_cosmosdb_account" "test" {
  name                = "${random_id.server.hex}"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  offer_type          = "Standard"
  consistency_policy {
    consistency_level = "BoundedStaleness"
  }

  failover_policy {
    location = "West Europe"
    priority = 0
  }

  failover_policy {
    location = "East US"
    priority = 1
  }

  tags {
    hello = "world"
  }
}

Debug Output

Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Error: Error running plan: 1 error(s) occurred:

  • provider.azurerm: No valid (unexpired) Azure CLI Auth Tokens found. Please run az login.

Panic Output

Expected Behavior

az account list => works
terraform plan => works

Actual Behavior

az account list => works
terraform plan => gives the message above
(this happens after a bit of time from when I did az login, the command works for a while, but go to lunch and it shows above error).

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

Important Factoids

References

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

Successfully merging a pull request may close this issue.

1 participant