AzureTRE: Workspace creation blocked due to Azure API depreciation.
Describe the bug I created a workspace for a user on September 10th. The user was unable to allocate time to use it until this week, so I disabled the workspace on the 10th, to reduce costs a bit.
Today, I tried to re-enable that workspace, and it fails. The message in the Operations tab is from Terraform, about being unable to register a Resource Provider:
Error message: 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
"skip_provider_registration" 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 "skip_provider_registration" flag can be found here
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs#skip_provider_registration
Original Error: determining which Required Resource Providers require registration: the required Resource Provider "Microsoft.TimeSeriesInsights" wasn't returned from the Azure API
with provider["registry.terraform.io/hashicorp/azurerm"],
on providers.tf line 20, in provider "azurerm":
20: provider "azurerm"
error running command /cnab/app/terraform /usr/bin/terraform apply -auto-approve -input=false -var
Steps to reproduce
- Create a workspace
- Disable it
- Wait two weeks (not sure how important that part is)
- (Try to) re-enable the workspace
Azure TRE release version (e.g. v0.14.0 or main): main, as of August 12th.
Deployed Azure TRE components - click the (i) in the UI: UI Version: 0.5.27 API Version: 0.18.11
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 28 (21 by maintainers)
Regarding this case. All the providers need updating and then the lock files where appropriate. Working on it now as a priority
PR to fix this raised https://github.com/microsoft/AzureTRE/pull/4097
@tim-allen-ck #4096 fixes the Terraform issue for the base workspace.
But as @JaimieWi mentions above the issue exists on other templates since each pins its own version of the azurerm providier, e.g. Guacamole:
Ah yes - I’ve removed that from my comment as I realised I was deploying the latest base workspace against a slightly older TRE. Just re-testing now.
Upping the azurerm provider version in the base workspace appears to work (as evidenced by other people in https://github.com/hashicorp/terraform-provider-azurerm/issues/27466). See fix here: https://github.com/nwsde/nwsde-azuretre/tree/jr/upstream-main/65-update-tf-providers