Skip to content

Commit c51db21

Browse files
authored
fix: Remove hardcoded aws partition in notifications sub-module (#165)
1 parent 8373e70 commit c51db21

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

modules/notification/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ No modules.
3131
| [aws_arn.queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/arn) | data source |
3232
| [aws_iam_policy_document.sns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
3333
| [aws_iam_policy_document.sqs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
34+
| [aws_partition.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source |
3435

3536
## Inputs
3637

modules/notification/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
data "aws_partition" "this" {}
2+
13
locals {
2-
bucket_arn = coalesce(var.bucket_arn, "arn:aws:s3:::${var.bucket}")
4+
bucket_arn = coalesce(var.bucket_arn, "arn:${data.aws_partition.this.partition}:s3:::${var.bucket}")
35

46
# Convert from "arn:aws:sqs:eu-west-1:835367859851:bold-starling-0" into "https://sqs.eu-west-1.amazonaws.com/835367859851/bold-starling-0" if queue_id was not specified
57
# queue_url used in aws_sqs_queue_policy is not the same as arn which is used in all other places

0 commit comments

Comments
 (0)