File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ resource "aws_secretsmanager_secret" "app" {
2424
2525 policy = lookup (local. arns , each. key , null ) == null ? null : data. aws_iam_policy_document . access [each . key ]. json
2626
27+ recovery_window_in_days = var. delete_in
28+
2729 tags = merge (var. tags , { " service" = var.app_name })
2830}
2931
Original file line number Diff line number Diff line change @@ -21,6 +21,18 @@ variable "secrets" {
2121 )
2222}
2323
24+ variable "delete_in" {
25+ description = " Number of days to wait before secret deletion"
26+ type = number
27+
28+ default = 30
29+
30+ validation {
31+ condition = var. delete_in == 0 || contains (range (7 , 30 ), var. delete_in )
32+ error_message = " The delete_in value must be 0 or between 7 and 30."
33+ }
34+ }
35+
2436variable "tags" {
2537 description = " Key-value map of tags"
2638 type = map (string )
You can’t perform that action at this time.
0 commit comments