-
Notifications
You must be signed in to change notification settings - Fork 4.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
azurerm_storage_share_file
- Post hex decode then base64 encode the value of content_md5
, to align with Azure expectation
#25715
Conversation
… value of `content_md5`, to align with Azure expectation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @magodo - Can you take a look if a state migration is possible here for existing users to resolve/avoid the breaking change? I think it should be possible to take the existing value, and run it through the conversion function there to ensure existing users are unaffected?
Thanks
@jackofallops The breaking change here indicates the API behavior in terms of Create/Update. For existing users, there shouldn't be a diff. There is no need to add a state migration here as the Read didn't change at all, where it still set the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting this @magodo. Whilst it technically is a breaking behavioral change, since it's (a) inarguably buggy at present and (b) gated behind d.HasChange()
, I think this is OK to merge 👍
Accordingly, I've removed the |
this shouldn't affect existing configs as there's no diff on read, and the update is behind d.HasChange
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. |
Community Note
Description
This PR changes added post processs (i.e. hex decode then base64 encode the value) for the
content_md5
, to align with Azure expectation.The current implementation of the
content_md5
(i.e. plainly set the value to API) will fail the post md5 check when users try to download the file viaazcopy
, e.g.Though this is technically a breaking change (for users who manually do the conversion before setting it in TF config), I still submit this change for two reasons:
azurerm_storage_blob
resource has the same behavior that post-processes thecontent_md5
PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
By uploading the
CHANGELOG.md
file at this branch:before (uploaded as
test
)Failed to download the file as it failed the md5sum check:
after (uploaded as
test2
)It is donwloaded successfully:
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_storage_share_file
- Post hex decode then base64 encode the value ofcontent_md5
, to align with Azure expectation [GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #25704
Note
If this PR changes meaningfully during the course of review please update the title and description as required.