Skip to content

[BUG] Deleting application blocked with wrong error #75

@hawksight

Description

@hawksight

Describe the bug

tlspc_application.app: Destroying... [id=ee9926d0-42ba-11f0-87a3-31249e61b1d7]
╷
│ Error: Error Deleting Application
│
│ Could not delete Application ID ee9926d0-42ba-11f0-87a3-31249e61b1d7: Failed to delete certificate template; response was: {"errors":[{"code":20226,"message":"Unable to delete the application
│ \"tiger-response-tlspk\" as it will impact the following related resources. Please reassign or remove all related resources to proceed:
│ SERVICE_ACCOUNT(eebcf4be-42ba-11f0-ae80-16bd14caa76a)","args":["tiger-response-tlspk","SERVICE_ACCOUNT(eebcf4be-42ba-11f0-ae80-16bd14caa76a)"]}]}
╵

To Reproduce
Steps to reproduce the behavior:

  1. Create an app
  2. Issue a certificate via the application
  3. Attempt to destroy the app via terraform
  4. See the error similar to above

To "fix" you actually need to remove the CA Templates from the app first.
After that, you can delete the app with terraform.

Expected behavior

  1. Correct error message, which is mainly down to the TLSPC API, but we could add some vaguely more useful error instead maybe.
  2. Delete the app. If I really wanted to keep it, I'd use terraform deletion protection feature.

Screenshots
Image

Environment (please complete the following information):

  • Terraform: [e.g. 1.10.0]
  • Other Providers and versions:

Additional context

Been using the hack of manually deleting the CAs for a while, so raising so I can remind myself to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions