pulumi-azure icon indicating copy to clipboard operation
pulumi-azure copied to clipboard

Token expires during longer Pulumi programs

Open ekrengel opened this issue 6 years ago • 5 comments

@metral and I were both trying to provision an AKS cluster which took a significant amount of time (~20-40mins). While pulumi up was running, our Authorization tokens expired resulting in this error:

error: Error building AzureRM Client: Error populating Client ID from the Azure CLI: No Authorization Tokens were found - please re-authenticate using `az login`.

This seems to be related to this TF error.

ekrengel avatar Apr 26 '19 16:04 ekrengel

Linking this issue... https://github.com/terraform-providers/terraform-provider-azurerm/issues/2602

stack72 avatar Jun 11 '19 16:06 stack72

Reproduction code https://pulumi.io/quickstart/kubernetes/tutorial-azure-kubernetes-service/

stack72 avatar Jun 11 '19 16:06 stack72

While the upstream issue is open for half-a-year, what's the workaround to apply in Pulumi programs?

Today, I got the failure while creating an instance of Azure API Management. The next run of pulumi up suggests creating a new one. Should I adopt the created-but-reported-as-failed resource somehow?

mikhailshilkov avatar Jun 14 '19 15:06 mikhailshilkov

It looks like this may be fixed with the provider version 1.20. I see this note in the docs:

Prior to version 1.20 the AzureRM Provider used a different method of authorizing via the Azure CLI where credentials reset after an hour - as such we'd recommend upgrading to version 1.20 or later of the AzureRM Provider.

praneetloke avatar Jul 19 '19 18:07 praneetloke

In the latest Terraform AzureRM provider that is due for release, the following is included in it

https://github.com/terraform-providers/terraform-provider-azurerm/pull/3850

I don't believe they are going to support anything other than Service Principal for the foreseeable future

stack72 avatar Jul 21 '19 17:07 stack72