-
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 provider doesn't support setting CORS for blob storage #19
Comments
Hey @joaocc Thanks for opening this issue :) Taking a look into this - it appears this option isn't available in the Azure SDK yet - and isn't in the Swagger either, which it's generated from. As such I've opened this issue asking for the Swagger to be updated to expose this property so that we can add support for this. Thanks |
@tombuildsstuff I'm not sure that this is correct. It may not be part of the ARM API, but it is certainly part of the storage API. It's part of the set-blob-service-properties action. I recall using this in the JavaScript SDK for a project over a year ago. I'm not sure if there's some architectural reason that the Terraform provider can't use that, though. It would seem to me that some calls are already being made to the Storage API to create blobs and containers. Edit: Documentation link. https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties |
This is actually affects all Azure Storage products, not just Blob Storage. You can set CORS rules for
|
Exists and requires use of the storage SDK: https://github.com/Azure/azure-sdk-for-go/tree/51228ee60b238eaa5a9d53adc82ebd8b321bca4f/storage |
Non-deprecated Storage SDK: Azure Storage Blob SDK for Go |
Any update on this? Would be great to set the CORS headers using terraform. |
👋 Just to give an update here - this is blocked on the migration to the new Storage SDK which we plan to do at some point once some blockers have been resolved. Thanks! |
So, when? I mean, what it could be, months? Years? Is there any label for blocker issues? |
@tombuildsstuff Are there any issues tracking the blockers to this one? Any way I can help sorting this out? Turns out I need this one too :) |
@tomasaschan at this time unfortunately we're blocked on a series of issues in the Azure Storage SDK for Go (some of which have been fixed, but others have no timeline/aren't planned to be fixed), including (in no particular order):
To be honest, given we're been blocked from adopting this SDK for 12-18 months, I have a feeling we may end up forking the existing Storage SDK to add the new functionality (which we'd rather not do, as we then have to maintain this going forwards) - since I don't believe this alternate SDK is going to be suitable for our use-cases anytime soon. On the flip side, we'd rather not write/maintain another SDK - so we've been in a bit of a holding pattern with this one, unfortunately. In the interim I've reached out through some internal channels to work out the best way to proceed here. Thanks! |
We're doing this with an
|
Hi @tombuildsstuff I think this may have been closed in error as this case is talking about configuring CORS for blob service whereas the 3859 release only fixed this for |
@tombuildsstuff I agree; this was probably closed in error. The scenario outlined in this issue is technically supported, since it's possible with an ARM template, but I agree with @ricohomewood that this should be natively supported by a Terraform resource (either the blob storage account/container itself, or a new resource for CORS settings). The fact that it's possible to work around the lack of native support for this using inlined ARM templates, makes the issue lower priority, but (IMO) does not make it resolved completely. |
@ricohomewood @tomasaschan sorry - thanks for letting us know. |
Thanks @tombuildsstuff being that |
Unfortunately this isn't something we've got a timeline for at the moment, since we're focused on 2.0 right now - but I'd agree this (should) be fairly quick to add |
Hey folks, I am running Azurerm 1.34.0 and am experiencing this. I had an existing storage resource defined and created and then added a queue_properties block and now consistently get:
Here is the complete resource. The location is australiasoutheast.
|
@worldspawn out of interest if you add/remove a tag to the storage account first does that error still occur? It appears that Storage Account is using an older API version (whilst we're requesting a new one) - adding/removing a Tag in Azure normally allows that to be updated |
@tombuildsstuff any chance this could make it in the v1.37.0 milestone due to its relative small scope for |
@tombuildsstuff I gave that a go and no change.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🎉 |
This has been released in version 2.0.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 = "~> 2.0.0"
}
# ... other configuration ... |
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 👉 [email protected]. Thanks! |
This issue was originally opened by @joaocc as hashicorp/terraform#8825. It was migrated here as part of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.7.3
Affected Resource(s)
azurerm_storage_account
Expected Behavior
There is currently no way to configure CORS via Terraform.
This means that storage accounts created via terraform cannot be used for things as simple as serving images or js scripts to be used in a website.
Actual Behavior
Cloud storage doesn't allow requests from a different origin.
The text was updated successfully, but these errors were encountered: