You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.
Terraform Version
1.9.6
AzureRM Provider Version
4.3.0
Affected Resource(s)/Data Source(s)
azurerm_storage_blob
Terraform Configuration Files
# Configure providerprovider"azurerm" {
features {}
subscription_id="xxxxxxxxxx"
}
terraform {
required_providers {
azurerm={
# User version 4.3.0
version ="4.3.0"
}
}
}
# Create a storage accountresource"azurerm_storage_account""test-storage" {
name="tfbugtest430"resource_group_name="rg-digid-authservice"account_replication_type="LRS"account_tier="Standard"location="australiaeast"
}
# Add a blob containerresource"azurerm_storage_container""test-container" {
name="bugtest-container"storage_account_name=azurerm_storage_account.test-storage.namecontainer_access_type="private"
}
# Add a blobresource"azurerm_storage_blob""deployed_files_branding_primary" {
name="bugtest-blob.html"storage_account_name=azurerm_storage_account.test-storage.namestorage_container_name="bugtest-container"type="Block"content_type="text/html"source_content=file("./test-file.html")
}
# test-file.html contains the following on first run:#<!DOCTYPE html>#<html>##<head># <title>Test page</title>#</head>##<body># <h1>This is a test</h1>#</body>##</html># test-file.html contains the following on second run: #<!DOCTYPE html>#<html>##<head># <title>Test page</title>#</head>##<body># <h1>This is a test</h1># <h2>This has been added after the first run.</h2>#</body>##</html>
Debug Output/Panic Output
See output here: https://raw.githubusercontent.com/MateMalice/tf-bug-reports/refs/heads/main/2024-09-25-storage-blob-upload-failed.txt
Expected Behaviour
The blob should have been updated in the container on the second run - i.e. the new contents of the blob should match the second version of "test-file.html".
Actual Behaviour
The blob is not being updated. Not only does the debug output not show a PUT or a POST call to update the blob, but the storage account shows no changes. The update timestamp of the blob is the same as the creation timestamp, so no update was made:
As such, the second line is not showing in the uploaded file, even though the Terraform state contains the update.
Steps to Reproduce
Create configuration as per above.
Run terraform apply a first time.
Modify the contents of test-file.html
Run terraform apply a second time
Important Factoids
No response
References
This problem has surfaced after v4.3.0 - it did not exist in v4.2.0. In version 4.3.0, changes to storage blobs ceased triggering a destroy/recreate operation, but only trigger an update operation. The problem might be related to this change: c197c2e
The text was updated successfully, but these errors were encountered:
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.
Is there an existing issue for this?
Community Note
Terraform Version
1.9.6
AzureRM Provider Version
4.3.0
Affected Resource(s)/Data Source(s)
azurerm_storage_blob
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The blob should have been updated in the container on the second run - i.e. the new contents of the blob should match the second version of "test-file.html".
Actual Behaviour
The blob is not being updated. Not only does the debug output not show a PUT or a POST call to update the blob, but the storage account shows no changes. The update timestamp of the blob is the same as the creation timestamp, so no update was made:
As such, the second line is not showing in the uploaded file, even though the Terraform state contains the update.
Steps to Reproduce
Important Factoids
No response
References
This problem has surfaced after v4.3.0 - it did not exist in v4.2.0. In version 4.3.0, changes to storage blobs ceased triggering a destroy/recreate operation, but only trigger an update operation. The problem might be related to this change: c197c2e
The text was updated successfully, but these errors were encountered: