-
Notifications
You must be signed in to change notification settings - Fork 6
/
secrets.tf
31 lines (26 loc) · 1.17 KB
/
secrets.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
resource "random_uuid" "runtask_hmac" {}
resource "aws_secretsmanager_secret" "runtask_hmac" {
#checkov:skip=CKV2_AWS_57:run terraform apply to rotate hmac
name = "${var.name_prefix}-runtask-hmac"
recovery_window_in_days = var.recovery_window
kms_key_id = aws_kms_key.runtask_key.arn
}
resource "aws_secretsmanager_secret_version" "runtask_hmac" {
secret_id = aws_secretsmanager_secret.runtask_hmac.id
secret_string = random_uuid.runtask_hmac.result
}
resource "random_uuid" "runtask_cloudfront" {
count = local.waf_deployment
}
resource "aws_secretsmanager_secret" "runtask_cloudfront" {
#checkov:skip=CKV2_AWS_57:run terraform apply to rotate cloudfront secret
count = local.waf_deployment
name = "${var.name_prefix}-runtask_cloudfront"
recovery_window_in_days = var.recovery_window
kms_key_id = aws_kms_key.runtask_key.arn
}
resource "aws_secretsmanager_secret_version" "runtask_cloudfront" {
count = local.waf_deployment
secret_id = aws_secretsmanager_secret.runtask_cloudfront[count.index].id
secret_string = random_uuid.runtask_cloudfront[count.index].result
}