Fix #548: use storage_container_id for azurerm_storage_blob#552
Merged
Conversation
storage_account_name and storage_container_name on azurerm_storage_blob are deprecated in favor of storage_container_id and will be removed in azurerm provider v5.0. Update the remote_scripts blobs in the vnet-app and vm-mssql-win modules to use storage_container_id. - vnet-app: reference azurerm_storage_container.this.id directly and expose it via resource_ids["storage_container"]. - vm-mssql-win: add a storage_container_id input (replacing the now unused storage_account_name input) and wire it from the root module. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
✅ Testing resultsDeployed a fresh sandbox on Environment
PR change validated during apply — both
Unit + integration tests —
The |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #548
Problem
storage_account_nameandstorage_container_nameonazurerm_storage_blobare deprecated in favor ofstorage_container_idand will be removed in v5.0 of the azurerm provider (see the resource docs).Changes
azurerm_storage_blob.remote_scriptsnow usesstorage_container_id = azurerm_storage_container.this.id. The container ID is also exposed viaresource_ids["storage_container"].azurerm_storage_blob.remote_scriptsnow uses a newstorage_container_idinput (replacing the now-unusedstorage_account_nameinput). Wired from the root module viamodule.vnet_app[0].resource_ids["storage_container"].storage_container_nameis retained in vm-mssql-win because it is still used to build the run-commandfileUris.Validation
terraform validate— passes (only a pre-existing, unrelatedlocal_authentication_disableddeprecation warning).terraform fmt -check— clean.tflint— clean.