Storage: Eliminating listing storage account when its resource ID is available to use GET#28617
Merged
jackofallops merged 2 commits intohashicorp:mainfrom Mar 5, 2025
Merged
Conversation
This was referenced Feb 13, 2025
Member
jackofallops
added a commit
that referenced
this pull request
Mar 5, 2025
jackofallops
added a commit
that referenced
this pull request
Mar 7, 2025
* Update CHANGELOG.md #28843 * Update CHANGELOG.md for #28748 * Update CHANGELOG.md for #28881 * Update CHANGELOG.md for #28909 * Update CHANGELOG.md fold in patch release and expand starred entry correctly * Update CHANGELOG.md remove duplicate entry for 28843 * Update CHANGELOG.md #28066 * Update CHANGELOG.md for #28902 and fix ordering * Update CHANGELOG.md for #28848 * Update CHANGELOG.md #27622 * Update CHANGELOG.md for #28271 * Update CHANGELOG.md update format * Update CHANGELOG.md #28934 * Update for #28619 #28598 * Update CHANGELOG.md #28940 * Update CHANGELOG.md for #28880 * Update CHANGELOG.md for #28617 * Update CHANGELOG.md #28721 * Update CHANGELOG.md #28949 * Update previous entry for 4.16.0 * Update CHANGELOG.md for #28834 * prep for release --------- Co-authored-by: Matthew Frahry <[email protected]> Co-authored-by: jackofallops <[email protected]> Co-authored-by: catriona-m <[email protected]> Co-authored-by: stephybun <[email protected]> Co-authored-by: Wodans Son <[email protected]> Co-authored-by: jackofallops <[email protected]>
Contributor
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Community Note
Description
Listing storage accounts under the scope of a subscription causing a lot of data consistency issues as is reported in #15048. Almost, all the list calls come from the invocation of
terraform-provider-azurerm/internal/services/storage/client/helpers.go
Line 149 in 509724a
The main reason to call the list is to map a storage account name to a storage account ID, with its API model (contains the different storage service endpoints).
There are multiple call points, which can be catagorized into the following:
azurerm_machine_learning_datastore_blobstorage): This is mostly because the API is designed to contain only the storage account name and a container name, while the provider tends to combine them into a storage container id (for UX).In the other case, that are covered by this PR is that the resource itself has the full storage account ID (instead of the name):
azurerm_storage_account,azurerm_storage_account_static_website,azurerm_storage_account_queue_properties: The resource id is just the storage account resource idazurerm_storage_containersDS: It references the storage account idFor these cases, a simple storage account targeted
GETis enough.For the long run, I think the storage account detail is not necessary for those data plane resources to build their clients. Since those data plane resources have their service-specific endpoint as the their resource id, we can then statically build the endpoints for other services, with a little more care about the Azure DNS zone endpoints. I'll hold on implementing this part until we've reached an agreement on this direction.
PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_resource- support for thething1property [GH-00000]This is a (please select all that apply):
Related Issue(s)
Relating to #15048
Note
If this PR changes meaningfully during the course of review please update the title and description as required.