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

Breaking change - Microsoft.StorageMover resource provider registration required in provider v3.51.0 #21363

Closed
1 task done
bubbletroubles opened this issue Apr 11, 2023 · 8 comments · Fixed by #21370
Closed
1 task done
Labels

Comments

@bubbletroubles
Copy link
Contributor

bubbletroubles commented Apr 11, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.x

AzureRM Provider Version

v3.51.0

Affected Resource(s)/Data Source(s)

any

Terraform Configuration Files

any resource

Debug Output/Panic Output

│ Original Error: Cannnot register providers: Microsoft.StorageMover. Errors were: Cannot register provider Microsoft.StorageMover with Azure Resource Manager: resources.ProvidersClient#Register: Failure responding to request: StatusCode=403 

Expected Behaviour

When deploying a config with the azurerm_storage_mover resource, and the resource provider is not registered, then a message appear to register the provider.

When deploying any config without the azurerm_storage_mover resource, that the Microsoft.StorageMover provider is not required.

Actual Behaviour

The deployment fails because Microsoft.StorageMover is not registered in the subscriptyion, and the service connection deploying the resource does not have permission to register it.

Steps to Reproduce

Deploy any AzureRM resource (except Storage Mover) to a subscription without Microsoft.StorageMover registered, using a service connection scoped at any level other than the subscription.
The deployment fails with the error

│ Original Error: Cannnot register providers: Microsoft.StorageMover. Errors were: Cannot register provider Microsoft.StorageMover with Azure Resource Manager: resources.ProvidersClient#Register: Failure responding to request: StatusCode=403 

Important Factoids

Microsoft.StorageMover was added as a required resource provider in AzureRM 3.51.0. However, it's not a common resource, and is a breaking change.

Microsoft's recommendation is to "Only register a resource provider when you're ready to use it. The registration step enables you to maintain least privileges within your subscription. A malicious user can't use resource providers that aren't registered.".

The AzureRM provider requiring registration of a non-mainstream resource is not best practice.

The release notes for the AzureRM provider release 3.51.0 do not mention that a new resource registration is required.

References

Storage Mover Pull Request
Storage Mover in required resource providers

@ASHR4
Copy link
Contributor

ASHR4 commented Apr 11, 2023

I'm having this as well, an interim fix is adding skip_provider_registration = "true" to your provider block:

provider "azurerm" { skip_provider_registration = "true" features {} }

Hope this gets fixed soon!

@ChrisTav424
Copy link

We are seeing this issue too. Thanks @ASHR4 we will try that

@sinbai
Copy link
Contributor

sinbai commented Apr 12, 2023

@bubbletroubles thanks for opening this issue. PR #21370 to fix this issue has been merged. That fix is expected to be released in the upcoming release v3.52.0 of the Terraform provider , so could you please track that to see whether you get unlocked?

@C-Roche
Copy link

C-Roche commented Apr 12, 2023

@sinbai Do you have an expected release date for v3.52.0? This issue is preventing deployments for me, but fixing it on my side (changing to a previously working version, for example) will cause me issues with my pipeline. If I know when v3.52.0 will be released, it will help me decide on my course of action.

@sinbai
Copy link
Contributor

sinbai commented Apr 12, 2023

@C-Roche Since I am not in charge of releases, I could not give an accurate release date for v3.52.0. But according to the release date here, it could be estimated the next release date should be before this weekend. Hope this is useful for you.

@sinbai
Copy link
Contributor

sinbai commented Apr 14, 2023

Just letting everyone know that this fix has been released in v3.52.0 of the Terraform Provider.

@GraemeMeyerGT
Copy link

Just to confirm that #21370 in 3.52.0 seems to have resolved this for me.

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
7 participants