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

azurerm_storage_account - Stop silently consuming 404 error when reading storage service properties #19062

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

magodo
Copy link
Collaborator

@magodo magodo commented Oct 31, 2022

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.

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)
Copy link
Member

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?)

Copy link
Collaborator Author

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 {

Copy link
Member

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?

Copy link
Collaborator Author

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.

@katbyte
Copy link
Collaborator

katbyte commented Jan 9, 2023

@magodo, any progress on this?

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.

Thanks for checking @magodo - LGTM 🍄

@katbyte katbyte merged commit 53f0cc7 into hashicorp:main Jan 17, 2023
@katbyte katbyte changed the title Stop silently consuming 404 error when reading storage service properties azurerm_storage_account - Stop silently consuming 404 error when reading storage service properties Jan 17, 2023
@github-actions github-actions bot added this to the v3.40.0 milestone Jan 17, 2023
katbyte added a commit that referenced this pull request Jan 17, 2023
@github-actions
Copy link

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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2023
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.

None yet

3 participants