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
The Azure provider prints a long and confusing TF related error message when the local credentials have expired.
We can probably do something similar to pulumi/pulumi-aws#2285 and match the error and print a better message.
The issue is fixed with az login but we print ~20 lines of unrelated text in the error before pointing the user to az login
Example
error: 1 error occurred:
* Error ensuring Resource Providers are registered.
Terraform automatically attempts to register the Resource Providers it supports to
ensure it's able to provision resources.
If you don't have permission to register Resource Providers you may wish to use the
"skipProviderRegistration" flag in the Provider block to disable this functionality.
Please note that if you opt out of Resource Provider Registration and Terraform tries
to provision a resource from a Resource Provider which is unregistered, then the errors
may appear misleading - for example:
> API version 2019-XX-XX was not found for Microsoft.Foo
Could indicate either that the Resource Provider "Microsoft.Foo" requires registration,
but this could also indicate that this Azure Region doesn't support this API version.
More information on the "skipProviderRegistration" flag can be found here:
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration
Original Error: populating Resource Provider cache: listing Resource Providers: loading results: authorizing request: running Azure CLI: exit status 1: ERROR: AADSTS700082: The refresh token has expired due to inactivity. The token was issued on 2024-03-14T13:26:50.7085348Z and was inactive for 12:00:00. Trace ID: 9e6e1da6-1da3-47cd-a1bb-6bb97fad1e00 Correlation ID: ecad4313-2dea-40cd-af14-f8c19930a077 Timestamp: 2024-03-15 12:52:28Z
Interactive authentication is needed. Please run:
az login --scope https://management.azure.com/.default
Output of pulumi about
CLI
Version 3.108.1
Go Version go1.22.0
Go Compiler gc
Plugins
NAME VERSION
azure 4.42.0
nodejs unknown
Host
OS darwin
Version 14.1.1
Arch arm64
This project is written in nodejs: executable='/opt/homebrew/bin/node' version='v21.6.1'
Backend
Name pulumi.com
URL https://app.pulumi.com/venelin-pulumi-corp
User venelin-pulumi-corp
Organizations venelin-pulumi-corp, demo, pulumi
Token type personal
Dependencies:
NAME VERSION
@pulumi/azure 4.42.0
@pulumi/pulumi 3.108.1
@types/node 10.17.60
mime-types 2.1.35
Pulumi locates its logs in /var/folders/82/nqnqw81s1h56l5nv940f9mq00000gn/T/ by default
warning: Failed to get information about the current stack: No current stack
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
What happened?
The Azure provider prints a long and confusing TF related error message when the local credentials have expired.
We can probably do something similar to pulumi/pulumi-aws#2285 and match the error and print a better message.
The issue is fixed with
az login
but we print ~20 lines of unrelated text in the error before pointing the user toaz login
Example
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: