Skip to content
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

Switching azurerm_storage_blob over to the new Storage SDK #4179

Merged
merged 39 commits into from
Sep 2, 2019

Conversation

tombuildsstuff
Copy link
Member

@tombuildsstuff tombuildsstuff commented Aug 28, 2019

Since this is quite a complex resource (in that there's different kinds of blobs) we're going to do this migration to the new SDK in phases. This first PR switches the SDK over to using the new Giovanni Storage SDK but doesn't add support for the new features - nor does it address the open TODO's/add validation/switch the test suite over - which will come in a subsequent PR.

This PR fixes #2245


ctx.wg.Done()
}
return resourceArmStorageBlobUpdate(d, meta)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(for info) this now calls into Update because the Access Tier might as well be set there, since it needs to be configured after creation anyway

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from one minor comment LGTM tom 👍


chunk := make([]byte, size)
_, err := page.section.Read(chunk)
if err != nil && err != io.EOF {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines could be merged:

Suggested change
if err != nil && err != io.EOF {
if _, err := page.section.Read(chunk) != nil && err != io.EOF {

@tombuildsstuff tombuildsstuff force-pushed the f/storage-blob-newsdk branch 2 times, most recently from fb5a557 to 570562b Compare September 1, 2019 06:45
@tombuildsstuff tombuildsstuff changed the title [WIP] Switching azurerm_storage_blob over to the new Storage SDK Switching azurerm_storage_blob over to the new Storage SDK Sep 1, 2019
@tombuildsstuff
Copy link
Member Author

I've done some manual testing with large files and this seems fine 👍

@tombuildsstuff
Copy link
Member Author

Travis is failing because a downstream dependency is offline: fatal: unable to access 'https://git.apache.org/thrift.git/': Failed to connect to git.apache.org port 443: Connection timed out but it's fine in TeamCity so this is fine 👍

@tombuildsstuff tombuildsstuff merged commit 9b201eb into master Sep 2, 2019
@tombuildsstuff tombuildsstuff deleted the f/storage-blob-newsdk branch September 2, 2019 05:55
tombuildsstuff added a commit that referenced this pull request Sep 2, 2019
@ghost
Copy link

ghost commented Sep 18, 2019

This has been released in version 1.34.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.34.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Oct 2, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Oct 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azurerm_storage_blob - error when storage account/RG have been deleted
2 participants