hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.76k stars 9.11k forks source link

[Bug]: Error: deleting Redshift Parameter Group (test-redshift): %!w(<nil>) #29032

Open Aransh opened 1 year ago

Aransh commented 1 year ago

Terraform Core Version

1.2.7

AWS Provider Version

4.51.0

Affected Resource(s)

aws_redshift_parameter_group

Expected Behavior

When running terraform destroy on the resource, it should be removed succesfully from both AWS and state file

Actual Behavior

The following error is being returned:

module.redshift.aws_redshift_parameter_group.this: Destroying... [id=test-redshift]
╷
│ Error: deleting Redshift Parameter Group (test-redshift): %!w(<nil>)

After running destroy again, it will return this error:

│ Error: reading Redshift Parameter Group (test-redshift): ClusterParameterGroupNotFound: ClusterParameterGroup test-redshift not found.
│   status code: 404, request id: ac32dc8a-9791-4d86-8433-00e8f7d19b9a

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_redshift_parameter_group" "this" {
  name   = "test"
  family = "redshift-1.0"
  description = "test parameter group"

  parameter {
      name         = "require_ssl"
      value         = "true
    }
}

Steps to Reproduce

terraform apply terraform destroy

Debug Output

No response

Panic Output

No response

Important Factoids

This bug has been introduced with the AWS provider version 4.51.0, works perfectly find with the previous version

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

MylesJones commented 1 year ago

I have noticed the exact same issue but with the codebuild_project resource.

Again, the issue was introduced in 4.51 and works fine in <= 4.50.