From 2816192533472013104a10f682da5cbdf8c2a41e Mon Sep 17 00:00:00 2001 From: badra001 Date: Tue, 1 Nov 2022 08:13:27 -0400 Subject: [PATCH] comment out regions, as startswith() is 1.x --- s3-flow-logs/README.md | 1 + s3-flow-logs/main.tf | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/s3-flow-logs/README.md b/s3-flow-logs/README.md index e5be2eb..1ff8f0a 100644 --- a/s3-flow-logs/README.md +++ b/s3-flow-logs/README.md @@ -69,6 +69,7 @@ No modules. | [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | | [aws_iam_policy_document.flowlogs_s3](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | | [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source | +| [aws_regions.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/regions) | data source | ## Inputs diff --git a/s3-flow-logs/main.tf b/s3-flow-logs/main.tf index 214a19e..2be3730 100644 --- a/s3-flow-logs/main.tf +++ b/s3-flow-logs/main.tf @@ -41,8 +41,8 @@ */ locals { - account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id - regions = [for r in tolist(data.aws_regions.current.names) : r if startswith(r, "us-")] + account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id + # regions = [for r in tolist(data.aws_regions.current.names) : r if startswith(r, "us-")] region = data.aws_region.current.name account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew"