-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Init using AzureRM Storage Account appears broken with 1.11 #36596
Comments
We're seeing this locally, but our debug log shows that the subscription is no longer being inferred the way that it used to be:
NOTE: the it looks like we can fix it locally by specifying |
We encountered both issues when going from 1.10 to 1.11 First, Second, this "invalid API version" issue.
Looking closely at the error message it contains The issue goes away when adding There does not appear to be an environment variable for this, but it can be passed to These issues arose when nothing was changed other than the TF version from 1.10 to 1.11, so I think both represent breaking changes |
We're getting this error
We use MSI with Azure RBAC to access the storage account, so do not set subscription or resource group. |
I can also confirm that including the resource group in the backend configuration solves the issue (I already had the subscription). Given these are not required fields, there is still a bug to be addressed here (or the fields should become required). EDIT: I spoke too soon. Adding the resource group does allow |
In case anyone else is running into these issues I'm finding that on terraform 1.10.5 the connection to the storage account was strictly over the data plane and so the storageaccount name was the only property needed. You could even use the wrong subscriptionID and the connection would still work. With terraform 1.11 the URL for the storage account is retrieved from the Azure management plane instead which means that the full resource ID is being formulated from the |
So is the breaking change that is #36258 going to be reverted, or will the next version of TF be 2.0? |
If this is it, then fine-granular access just fell apart and I'm now forced to create Storage Accounts which serve my project teams as a backend. In the past, I was able to handle one Storage Account and grant fine granular access to the automation service principals to their containers, giving me the opportunity to also backup the whole Storage Account into whatever backup destination fitted the need. IMHO this is a breaking change. |
Sorry folks for the breaking change.. I've made a fix in #36623, and tested it as much as possible to ensure all the cases are covered (see the PR description). |
@magodo Thanks a lot for the quick response! Downgraded to v1.10.5 and will try the fixed version as soon as it's released. I downloaded the source for the azurerm provider and banging my head on the wall to find out where is the code that initializes the backend. It's really surprising finding out it's on the core code. I thought the core "invoked" the provider via RPC. Is there somewhere a doc explaining how init works internally? Or looking at the core code is the way? OTOH I've never looked at providers internally. It was a fun ride and perhaps I'll take sometime trying to tackle issues on aws or azure provider. |
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
Initialization proceeds successfully as it did in 1.10.x
Actual Behavior
The error above.
Steps to Reproduce
Additional Context
None. Occurs on a local dev machine and using GitHub runners (that consume the
setup-terraform
action to install thelatest
version ofterraform
).References
From the release notes
It looks like this was something that was changed in the 1.11 version. Though I don't imagine whatever was changed was intended to break with an API version change.
Generative AI / LLM assisted development?
???
The text was updated successfully, but these errors were encountered: