Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
- prevent service endpoint error 404 durring re-create #23002azurerm_storage_account
- prevent service endpoint error 404 durring re-create #23002Changes from 33 commits
98a37d4
b9a44a6
dd2f6db
0e0d0a2
bcb5cc9
2c40e2d
f100c07
7f3dc7b
ac9422b
829a0bd
b8d5e67
c84b3f4
2a835fd
b49f350
a4d248a
e247773
5c6de6a
e68458e
8c1d73f
fc34db3
9222c35
76c19b6
094fbb2
2ba08d0
07acfd6
a2fb14c
2db176d
1b90c7e
b536a63
eff5176
c69e92c
bb6b96d
c33eed5
eab7607
abc3d63
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think we can simplify this to:
Since the
handleStorageServiceError
function below assumes that this is Completed if it's not a 404 (which would mean we mark this as Completed when it's an error?)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.
If the
queueClient.GetServiceProperties
function returns error (this may be the 404 error or any other error storage API may return)This error (generic error type) is handled by
handleStorageServiceError
function. It returnPending
, in case of 404, however any other error is returned imidiately withCompleted
to brake the loop.This has been requested by @magodo to avoid consuming all errors.
If i understand the logic correctly, in your example the loop will continue also in case of non 404 error?
And one exception here for queue endpoint > there is no error in case of 404 and therefore i put there the workaround below
if properties == nil
You the owners, you can say the final word how the code should looks like. From my point of view the function
handleStorageServiceError
make sense and therefore asking for confirmation.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 Could you please review above comment?
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.
(as above) we should be able to just return
Pending
here instead?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.
(as above) we should be able to just return
Pending
here instead?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.
as such I think this function can be removed?
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.
this would destroy the resource group too, instead we can delete just the account via:
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.
fixed. also for basic account