From 8e72caa2786525155f133478a56ced470e58ec50 Mon Sep 17 00:00:00 2001 From: Erik Weber Date: Mon, 8 Jul 2024 13:26:12 +0200 Subject: [PATCH] PR #825 introduced new iam conditions, one uses wildcard with Like operator (#879) --- terraform-modules/cur-setup-destination/main.tf | 2 +- terraform-modules/cur-setup-source/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/terraform-modules/cur-setup-destination/main.tf b/terraform-modules/cur-setup-destination/main.tf index de93c7de..eabad48c 100644 --- a/terraform-modules/cur-setup-destination/main.tf +++ b/terraform-modules/cur-setup-destination/main.tf @@ -155,7 +155,7 @@ data "aws_iam_policy_document" "bucket_policy" { "${aws_s3_bucket.this.arn}/*", ] condition { - test = "StringEquals" + test = "StringLike" values = ["arn:${data.aws_partition.this.partition}:cur:${data.aws_region.this.name}:${data.aws_caller_identity.this.account_id}:definition/*"] variable = "aws:SourceArn" } diff --git a/terraform-modules/cur-setup-source/main.tf b/terraform-modules/cur-setup-source/main.tf index cdd82fcb..42e5014c 100644 --- a/terraform-modules/cur-setup-source/main.tf +++ b/terraform-modules/cur-setup-source/main.tf @@ -147,7 +147,7 @@ data "aws_iam_policy_document" "bucket_policy" { "${aws_s3_bucket.this.arn}/*", ] condition { - test = "StringEquals" + test = "StringLike" values = ["arn:${data.aws_partition.this.partition}:cur:${data.aws_region.this.name}:${data.aws_caller_identity.this.account_id}:definition/*"] variable = "aws:SourceArn" }