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

Support the new ForceDeleteWithoutRecovery attribute when deleting secrets #5521

Closed
copumpkin opened this issue Aug 12, 2018 · 4 comments · Fixed by #5583
Closed

Support the new ForceDeleteWithoutRecovery attribute when deleting secrets #5521

copumpkin opened this issue Aug 12, 2018 · 4 comments · Fixed by #5583
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/secretsmanager Issues and PRs that pertain to the secretsmanager service.
Milestone

Comments

@copumpkin
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

As of a few days ago, Secrets Manager supports immediate deletion of secrets, as you can see in here. It would be nice if we could instruct Terraform to ignore the standard deletion window and use that attribute.

New or Affected Resource(s)

  • aws_secretsmanager_secret

References

@radeksimko radeksimko added enhancement Requests to existing resources that expand the functionality or scope. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. labels Aug 13, 2018
@bflad
Copy link
Contributor

bflad commented Aug 17, 2018

Pull request submitted with support of the new ForceDeleteWithoutRecovery parameter for DeleteSecret: #5583

@bflad bflad added this to the v1.33.0 milestone Aug 22, 2018
@bflad
Copy link
Contributor

bflad commented Aug 22, 2018

In version 1.33.0 of the AWS provider, likely releasing later today, the aws_secretsmanager_secret resource will support:

  • Setting recovery_window_in_days to 0, which will "immediately" delete the secret (technically its an asynchronous process started in the background by the Secrets Manager service).
  • On creation it will retry on InvalidRequestException: You can’t perform this operation on the secret because it was deleted. errors waiting for the background process to complete, which allows for recreating deleted secrets using the method above.

Please note for updating existing aws_secretsmanager_secret resources: updating the recovery_window_in_days argument must have terraform apply ran before any sort of deletion operation (e.g. terraform destroy, count = 0) for it to take effect.

@bflad
Copy link
Contributor

bflad commented Aug 22, 2018

This has been released in version 1.33.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 3, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/secretsmanager Issues and PRs that pertain to the secretsmanager service.
Projects
None yet
3 participants