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]: Unable to delete Application PinPoint, destroy command error #29341

Closed
jorgeakanieves opened this issue Feb 10, 2023 · 3 comments · Fixed by #30101
Closed

[Bug]: Unable to delete Application PinPoint, destroy command error #29341

jorgeakanieves opened this issue Feb 10, 2023 · 3 comments · Fixed by #30101
Labels
bug Addresses a defect in current functionality. service/pinpoint Issues and PRs that pertain to the pinpoint service.

Comments

@jorgeakanieves
Copy link

jorgeakanieves commented Feb 10, 2023

Terraform Core Version

1.1.9

AWS Provider Version

> 4.50.0

Affected Resource(s)

aws_pinpoint_app

Expected Behavior

Destroyed resources completed without errors

Actual Behavior

When destroying a previously created application PinPoint resource, it fails and returns: "Error: deleting Pinpoint Application (<app_id>): %!s()"

The resource is removed in AWS but state still remains.

Relevant Error/Panic Output Snippet

Error: deleting Pinpoint Application (<app_id>): %!s()

Terraform Configuration Files

terraform {
  required_version = ">= 0.13, <2.0.0"
  required_providers {
    aws = {
      version = ">4.50.0"
    }
  }
}

resource "aws_pinpoint_app" "this" {
  name = "foo"
}

Steps to Reproduce

terraform destroy -auto-approve

Debug Output

aws_pinpoint_app.this: Destroying... [id=]
2023-02-10T12:21:46.391+0100 [INFO] Starting apply for aws_pinpoint_app.this
2023-02-10T12:21:46.619+0100 [ERROR] provider.terraform-provider-aws_v4.51.0_x5: Response contains error diagnostic: caller=github.com/hashicorp/[email protected]/tfprotov5/internal/diag/diagnostics.go:55 module=sdk.proto diagnostic_detail= tf_resource_type=aws_pinpoint_app tf_rpc=ApplyResourceChange diagnostic_severity=ERROR diagnostic_summary="deleting Pinpoint Application (): %!s()" tf_proto_version=5.3 tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id= timestamp=2023-02-10T12:21:46.619+0100
2023-02-10T12:21:46.622+0100 [ERROR] vertex "aws_pinpoint_app.this (destroy)" error: deleting Pinpoint Application (): %!s()

│ Error: deleting Pinpoint Application (): %!s()

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@jorgeakanieves jorgeakanieves added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Feb 10, 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/pinpoint Issues and PRs that pertain to the pinpoint service. label Feb 10, 2023
@ewbankkit
Copy link
Contributor

func resourceAppDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
var diags diag.Diagnostics
conn := meta.(*conns.AWSClient).PinpointConn()
log.Printf("[DEBUG] Pinpoint Delete App: %s", d.Id())
_, err := conn.DeleteAppWithContext(ctx, &pinpoint.DeleteAppInput{
ApplicationId: aws.String(d.Id()),
})
if tfawserr.ErrCodeEquals(err, pinpoint.ErrCodeNotFoundException) {
return diags
}
return sdkdiag.AppendErrorf(diags, "deleting Pinpoint Application (%s): %s", d.Id(), err)
}

Missing

if err != nil {
    ...
}

return nil

@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 Apr 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/pinpoint Issues and PRs that pertain to the pinpoint service.
Projects
None yet
2 participants