Let azurerm_storage_share_file
re-create deleted files
#13269
Merged
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.
azurerm_storage_share_file
in plan/apply/destroy currently fails when a file created byazurerm_storage_share_file
was deleted outside of Terraform. This behavior is, from my point of view, not consistent with how other resources deal with changes done outside of Terraform.This PR changes the behavior by switching from failing to recognizing and re-creating the file:
https://github.com/heoelri/terraform-provider-azurerm/blob/71e4c20d9e46a4aeed45d368f55c777542d26c94/internal/services/storage/storage_share_file_resource.go#L288-L293
instead of
terraform-provider-azurerm/internal/services/storage/storage_share_file_resource.go
Lines 288 to 291 in aa05369
This will now result in re-creating the deleted file if needed:
I've also updated the used giovanni sdk components from
2019-12-12
to2020-08-04
. @tombuildsstuff FYICC @sebader