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]: Cannot delete redshift_workgroup due to invalid resource state: "AVAILABLE" #29962

Closed
ghost opened this issue Mar 13, 2023 · 2 comments · Fixed by #32067
Closed

[Bug]: Cannot delete redshift_workgroup due to invalid resource state: "AVAILABLE" #29962

ghost opened this issue Mar 13, 2023 · 2 comments · Fixed by #32067
Labels
bug Addresses a defect in current functionality. service/redshiftserverless Issues and PRs that pertain to the redshiftserverless service.

Comments

@ghost
Copy link

ghost commented Mar 13, 2023

Terraform Core Version

1.3.9

AWS Provider Version

4.57.1

Affected Resource(s)

  • aws_redshiftserverless_workgroup

Expected Behavior

Terraform should delete aws_redshiftserverless_workgroup without problems. It may expect AVAILABLE as temporary state or it may be fixed in the API.

Actual Behavior

Terraform cannot delete aws_redshiftserverless_workgroup due to initial state being AVAILABLE instead of DELETING or MODIFYING,

Relevant Error/Panic Output Snippet

Error: deleting Redshift Serverless Workgroup (my-workgroup): waiting for completion: unexpected state 'AVAILABLE', wanted target ''. last error: %!s(<nil>)

Terraform Configuration Files

resource "aws_redshiftserverless_namespace" "redshift" {
  namespace_name = "my-namespace"

  db_name             = "database"
  admin_username      = "admin"
  admin_user_password = "admin"

  default_iam_role_arn = aws_iam_role.redshift.arn

  log_exports = ["userlog", "connectionlog", "useractivitylog"]
}

resource "aws_redshiftserverless_workgroup" "redshift" {
  workgroup_name = "my-workgroup"

  namespace_name = aws_redshiftserverless_namespace.redshift.id
  base_capacity  = 32

  enhanced_vpc_routing = false
  publicly_accessible  = true
  security_group_ids   = var.sg_ids
  subnet_ids           = var.subnet_ids
}

Steps to Reproduce

  • Create Redshift Namespace and Workgroup using Terraform
  • Run terraform destroy

Debug Output

No response

Panic Output

No response

Important Factoids

I noticed same issue occurring when using boto3. State doesn't always change to DELETING immediately after calling delete_workgroup

References

Would you like to implement a fix?

No

@ghost ghost added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Mar 13, 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 Mar 13, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Mar 14, 2023
@github-actions
Copy link

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 Jul 17, 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.
Projects
None yet
1 participant