-
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
Retry to create storage container. #846
Conversation
#841 Signed-off-by: Genevieve LEsperance <[email protected]>
@@ -124,6 +125,18 @@ func resourceArmStorageContainerCreate(d *schema.ResourceData, meta interface{}) | |||
return resourceArmStorageContainerRead(d, meta) | |||
} | |||
|
|||
func checkContainerIsCreated(reference *storage.Container) func() *resource.RetryError { | |||
return func() *resource.RetryError { | |||
createOptions := &storage.CreateContainerOptions{} |
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.
Should we explicitly set timeout here so we can effectively use the timeout duration of the Retry
call? I'm not sure on the default, maybe its ok?
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.
There’s only one other instance of retrying in the codebase that’s I found and the timeout was not configurable. We can add a create timeout to the scheme if we think it should be adjustable?
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.
we lean on the SDK's default timeout through the codebase, so I don't think we need to override this value? (2m should be enough time for Azure to become consistent)
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.
👍 LGTM - thanks for this! I'll kick off the test suite now..
@@ -124,6 +125,18 @@ func resourceArmStorageContainerCreate(d *schema.ResourceData, meta interface{}) | |||
return resourceArmStorageContainerRead(d, meta) | |||
} | |||
|
|||
func checkContainerIsCreated(reference *storage.Container) func() *resource.RetryError { | |||
return func() *resource.RetryError { | |||
createOptions := &storage.CreateContainerOptions{} |
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.
we lean on the SDK's default timeout through the codebase, so I don't think we need to override this value? (2m should be enough time for Azure to become consistent)
Still it's failing with the following error. azurerm_storage_container.be-sc: Error creating container "XXXXXXX" in storage account "XXXXXXXX": storage: service returned error: StatusCode=403, ErrorCode=AuthenticationFailed, ErrorMessage=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. |
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! |
#841