Skip to content

Commit

Permalink
When an app secret is removed, it is immediately deleted from AWS sec…
Browse files Browse the repository at this point in the history
…rets manager (#7)
  • Loading branch information
BSick7 authored Jan 22, 2025
1 parent 32512d0 commit 2713659
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.2.3 (Jan 22, 2025)
* When an app secret is removed, it is immediately deleted from AWS secrets manager.

# 0.2.2 (Feb 20, 2024)
* Added support for variable and secret interpolation.

Expand Down
7 changes: 4 additions & 3 deletions secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ locals {
resource "aws_secretsmanager_secret" "app_secret" {
for_each = local.secret_keys

name_prefix = "${local.block_name}/${each.value}/"
tags = local.tags
kms_key_id = aws_kms_alias.this.arn
name_prefix = "${local.block_name}/${each.value}/"
tags = local.tags
kms_key_id = aws_kms_alias.this.arn
recovery_window_in_days = 0 // force delete so that re-adding the secret doesn't cause issues

lifecycle {
create_before_destroy = true
Expand Down

0 comments on commit 2713659

Please sign in to comment.