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

[Bug]: aws_redshiftserverless_workgroup times out creating nearly 100% of the time #31048

Closed
RicePatrick opened this issue Apr 28, 2023 · 4 comments · Fixed by #31054
Closed
Labels
bug Addresses a defect in current functionality. service/redshiftserverless Issues and PRs that pertain to the redshiftserverless service. timeouts Pertains to timeout increases.
Milestone

Comments

@RicePatrick
Copy link
Contributor

Terraform Core Version

1.4.5

AWS Provider Version

4.64.0

Affected Resource(s)

aws_redshiftserverless_workgroup

Expected Behavior

Resource creates successfully

Actual Behavior

The resource will nearly always timeout during creation while waiting for the resource to become Available. This appears to happen because the resource is created then immediately modified, and the timeout is not long enough to account for the modification to complete.

waiting for Redshift Serverless Workgroup (redshift-serverless-88-workspace) to be created: timeout while waiting for state to become 'AVAILABLE' (last state: 'MODIFYING', timeout: 10m0s)

Relevant Error/Panic Output Snippet

╷
│ Error: waiting for Redshift Serverless Workgroup (redshift-serverless-88-workspace) to be created: timeout while waiting for state to become 'AVAILABLE' (last state: 'MODIFYING', timeout: 10m0s)
│ 
│   with aws_redshiftserverless_workgroup.redshift_db_workgroup,
│   on redshift.tf line 22, in resource "aws_redshiftserverless_workgroup" "redshift_db_workgroup":
│   22: resource "aws_redshiftserverless_workgroup" "redshift_db_workgroup" {
│

Terraform Configuration Files

resource "aws_redshiftserverless_workgroup" "redshift_db_workgroup" {
  namespace_name = aws_redshiftserverless_namespace.redshift_db_namespace.id

  workgroup_name = "redshift-serverless-${var.usage}-workspace"
  base_capacity  = var.base_redshift_capacity

  // This is intention for business reasons, and is protected by the security group.
  publicly_accessible = true
  security_group_ids  = [aws_security_group.redshift_sg.id]
  subnet_ids          = data.aws_subnets.redshift_subnets.ids
}

There are obviously some resources that are populated by data sources or variables, but it's a relatively minimal configuration.

Steps to Reproduce

Simply apply the configuration and wait 10 minutes.

Debug Output

No response

Panic Output

No response

Important Factoids

The resource does reach Available eventually, it just takes longer than the timeout provides. The resource will occasionally succeed as a result, since the resource will occasionally reach Available quickly enough.

Simply allowing for configuring the timeout will resolve this bug, though it's likely increasing the default timeout would also be good to cover a majority of user's cases.

References

No response

Would you like to implement a fix?

Yes

@RicePatrick RicePatrick added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Apr 28, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/redshiftserverless Issues and PRs that pertain to the redshiftserverless service. label Apr 28, 2023
@RicePatrick
Copy link
Contributor Author

Note: there was a previous issue reported around this: #26522 . That resource mentioned that using a dependent resource fixed the issue. I have a resource that depends on the endpoint attribute, and that does not resolve the issue. The rate of error has absolutely increased over time, which is likely just related to AWS taking longer to modify the resource.

@justinretzolk justinretzolk added timeouts Pertains to timeout increases. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 28, 2023
@github-actions github-actions bot added this to the v4.66.0 milestone May 4, 2023
@github-actions
Copy link

github-actions bot commented May 5, 2023

This functionality has been released in v4.66.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!

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

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 have found a problem that seems similar to this, 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 Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/redshiftserverless Issues and PRs that pertain to the redshiftserverless service. timeouts Pertains to timeout increases.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants