Skip to content

Commit

Permalink
pinned kms version
Browse files Browse the repository at this point in the history
  • Loading branch information
Tay Jia Shin committed Sep 2, 2024
1 parent fecbf2a commit 5490de3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/s3-inventory/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ resource "random_pet" "this" {
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/configure-inventory.html#configure-inventory-kms-key-policy
module "kms" {
source = "terraform-aws-modules/kms/aws"
version = "~> 2.0"

description = "Key example for Inventory S3 destination encyrption"
deletion_window_in_days = 7
Expand Down
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,10 @@ data "aws_iam_policy_document" "inspector_findings_delivery_policy" {
sid = "allow-inspector"
effect = "Allow"

actions =[
"s3:PutObject",
"s3:PutObjectAcl",
"s3:AbortMultipartUpload"
actions = [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:AbortMultipartUpload"
]

resources = ["${aws_s3_bucket.this[0].arn}/*"]
Expand All @@ -941,7 +941,7 @@ data "aws_iam_policy_document" "inspector_findings_delivery_policy" {
test = "ArnLike"
variable = "aws:SourceArn"
values = [
format("%s%s%s","arn:aws:inspector2:Region:", data.aws_caller_identity.current.id, ":report/*")
format("%s%s%s", "arn:aws:inspector2:Region:", data.aws_caller_identity.current.id, ":report/*")
]
}
}
Expand Down

0 comments on commit 5490de3

Please sign in to comment.