pulumi-azure
pulumi-azure copied to clipboard
Token expires during longer Pulumi programs
@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.
Linking this issue... https://github.com/terraform-providers/terraform-provider-azurerm/issues/2602
Reproduction code https://pulumi.io/quickstart/kubernetes/tutorial-azure-kubernetes-service/
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?
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.
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