hashicorp / terraform-provider-vault

Terraform Vault provider
https://www.terraform.io/docs/providers/vault/
Mozilla Public License 2.0
457 stars 536 forks source link

Handle out-of-band approle deletion #2142

Closed vinay-gopalan closed 6 months ago

vinay-gopalan commented 6 months ago

Cleans up the AppRole Secret ID resource from TF state when a 500 error is returned from the Vault server upon an out-of-band deletion of the AppRole. Previously, all subsequent runs of TF would fail with the error. Ideally we should remove the non-existent secret ID from state and allow the TFVP to recreate the role and secret ID.

Closes #1683 #1666

Checklist

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
=== RUN   TestAccAppRoleAuthBackendRoleSecretID_basic
--- PASS: TestAccAppRoleAuthBackendRoleSecretID_basic (6.44s)
PASS