Skip to content

Commit c25b19b

Browse files
authored
Fixed aws partition value (#221)
1 parent 4c1527d commit c25b19b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ No modules.
161161
| [aws_iam_policy_document.inventory_and_analytics_destination_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
162162
| [aws_iam_policy_document.lb_log_delivery](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
163163
| [aws_iam_policy_document.require_latest_tls](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
164+
| [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source |
164165
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
165166

166167
## Inputs

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ data "aws_canonical_user_id" "this" {}
44

55
data "aws_caller_identity" "current" {}
66

7+
data "aws_partition" "current" {}
78
locals {
89
create_bucket = var.create_bucket && var.putin_khuylo
910

@@ -571,7 +572,7 @@ data "aws_iam_policy_document" "elb_log_delivery" {
571572

572573
principals {
573574
type = "AWS"
574-
identifiers = [format("arn:aws:iam::%s:root", statement.value)]
575+
identifiers = [format("arn:%s:iam::%s:root", data.aws_partition.current.partition, statement.value)]
575576
}
576577

577578
effect = "Allow"

0 commit comments

Comments
 (0)