-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/ecs_service: add wait condition after create/update and handle errors when using wait_for_steady_state
#24223
Conversation
When using `wait_for_stead_state` retry up to 3 times. This is due to when a service is replaced there is a possibility the service will return a status of INACTIVE as the AWS API returns the status of the old service instead of the new one which hasn't fully registered yet.
…IVE state after resource creation
Output of acceptance tests after updates:
|
wait_for_steady_state
Thanks again @rwky ! Going to get these changes out now and see how they perform 👍 I'll keep the linked issue open as suggested |
@@ -1221,6 +1221,26 @@ func (c *Config) Client(ctx context.Context) (interface{}, diag.Diagnostics) { | |||
} | |||
}) | |||
|
|||
client.ECSConn.Handlers.Retry.PushBack(func(r *request.Request) { | |||
// By design the "WaitUntilServicesStable" method will poll every 15 seconds until a successful state |
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 is not actually true, it polls until it's either MISSING, DRAINING, INACTIVE or successful, the docs aren't clear on this but the code is https://github.com/aws/aws-sdk-go/blob/main/service/ecs/waiters.go#L79-L105
This functionality has been released in v4.10.0 of the Terraform AWS 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 issues. |
Community Note
Closes #23747 (this PR is a continuation)
Relates #20452
Output from acceptance testing: