From 5490de32a6b236b17aac4b4526f8143407f9879a Mon Sep 17 00:00:00 2001 From: Tay Jia Shin Date: Mon, 2 Sep 2024 10:47:02 +0800 Subject: [PATCH] pinned kms version --- examples/s3-inventory/main.tf | 1 + main.tf | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/s3-inventory/main.tf b/examples/s3-inventory/main.tf index ddbcf73..300f191 100644 --- a/examples/s3-inventory/main.tf +++ b/examples/s3-inventory/main.tf @@ -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 diff --git a/main.tf b/main.tf index f28b6be..33ebb98 100644 --- a/main.tf +++ b/main.tf @@ -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}/*"] @@ -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/*") ] } }