-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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_account - Stop silently consuming 404 error when reading storage service properties #19062
Conversation
if !utils.ResponseWasNotFound(blobProps.Response) { | ||
return fmt.Errorf("reading blob properties for AzureRM Storage Account %q: %+v", id.Name, err) | ||
} | ||
return fmt.Errorf("reading blob properties for AzureRM Storage Account %q: %+v", id.Name, err) |
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.
from memory this API can only be called for some kind of Storage Accounts, otherwise it returns a 404 - so I think this'll break those (I want to say Blob/File accounts?)
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.
Then we shall accordingly update the code that evaluates the supportLevel
?
func resolveStorageAccountServiceSupportLevel(kind storage.Kind, tier storage.SkuTier) storageAccountServiceSupportLevel { |
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.
sure, there should be tests for that - would you be able to take a look?
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.
@tombuildsstuff Yes, I've tried to deploy storage accounts of all the five possible account_kind
, which are all successfully created and have no diff in a follow-up plan. I've checked that these possible account_kind
are also covered in the existing acctests.
@magodo, any progress on this? |
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 checking @magodo - LGTM 🍄
This functionality has been released in v3.40.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
The logic to silently ignore the 404 error when reading the storage service properties was firstly introduced in #3859.
I'm not sure whether it is a good idea, as it causes errors to be hidden and revealed at a later point.
E.g. as is reported in #13070 (comment), there were 404 errors when reading a just created storage account, but it was ignored. Later the creation for the storage container failed also with 404.