Skip to content

Commit

Permalink
Update kms.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
mynampatinaveen authored Sep 9, 2024
1 parent 71f1f61 commit d2ff6f3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions modules/products/static-site/kms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ resource "aws_kms_key" "static_site_kms" {
}

resource "aws_kms_key_policy" "static_site_kms_policy" {
key_id = aws_kms_key.static_site_kms.id
policy = jsonencode({
Version = "2012-10-17"
Id = "static_site_kms_policy"
Expand All @@ -19,13 +20,8 @@ resource "aws_kms_key_policy" "static_site_kms_policy" {
Principal = {
type = "Service"
identifiers = ["cloudfront.amazonaws.com"]
}
},
Resource = ["*"]
condition = {
test = "StringEquals"
variable = "aws:SourceArn"
values = [aws_cloudfront_distribution.static_site_distribution.arn]
}
},
]
})
Expand Down

0 comments on commit d2ff6f3

Please sign in to comment.