From 5d59c5fb13e0f3fb5dcb429709831c1adb790acb Mon Sep 17 00:00:00 2001 From: Alex English Date: Thu, 19 Nov 2026 16:00:03 -0800 Subject: [PATCH 1/2] Let incubator-tf-plan read Amazon Location resources --- terraform/aws-custom-policies.tf | 5 +++++ .../aws-custom-policies/tf-plan-location-read.json | 14 ++++++++++++++ terraform/aws-gha-oidc-providers.tf | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 terraform/aws-custom-policies/tf-plan-location-read.json diff --git a/terraform/aws-custom-policies.tf b/terraform/aws-custom-policies.tf index ac2c698..a9b9c9b 100644 --- a/terraform/aws-custom-policies.tf +++ b/terraform/aws-custom-policies.tf @@ -13,5 +13,10 @@ module "aws_custom_policies" { description = "Allows incubator tf plan role to read specific Secrets Manager secrets needed for terraform plan" filename = "tf-plan-scoped.json" } + # The AWS-managed ReadOnlyAccess policy grants no geo: actions at all. + "IncubatorTfPlanLocationRead" = { + description = "Allows incubator tf plan role to read Amazon Location resources during terraform plan" + filename = "tf-plan-location-read.json" + } } } diff --git a/terraform/aws-custom-policies/tf-plan-location-read.json b/terraform/aws-custom-policies/tf-plan-location-read.json new file mode 100644 index 0000000..4004172 --- /dev/null +++ b/terraform/aws-custom-policies/tf-plan-location-read.json @@ -0,0 +1,14 @@ +{ + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "AllowLocationReadForTerraformPlan", + "Effect": "Allow", + "Action": [ + "geo:Describe*", + "geo:List*" + ], + "Resource": "*" + } + ] +} diff --git a/terraform/aws-gha-oidc-providers.tf b/terraform/aws-gha-oidc-providers.tf index a27bd08..0a9a95e 100644 --- a/terraform/aws-gha-oidc-providers.tf +++ b/terraform/aws-gha-oidc-providers.tf @@ -72,6 +72,11 @@ resource "aws_iam_role_policy_attachment" "incubator_tf_plan_secrets_read" { policy_arn = module.aws_custom_policies.policy_arns["IncubatorTfPlanSecretsRead"] } +resource "aws_iam_role_policy_attachment" "incubator_tf_plan_location_read" { + role = aws_iam_role.incubator_tf_plan.name + policy_arn = module.aws_custom_policies.policy_arns["IncubatorTfPlanLocationRead"] +} + resource "aws_iam_role" "incubator_tf_apply" { name = "incubator-tf-apply" assume_role_policy = jsonencode({ From 083a27debb2c0109582136be59f7539d819e9829 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Nov 2026 00:00:22 +0000 Subject: [PATCH 2/2] terraform-docs: automated updates to Terraform modules README.md [skip ci] --- terraform/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/README.md b/terraform/README.md index a7a5207..01f81e7 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -78,6 +78,7 @@ Terraform directory structure | [aws_iam_role_policy.user_bot](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource | | [aws_iam_role_policy.user_bot_deploy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource | | [aws_iam_role_policy_attachment.incubator_tf_apply_admin](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | +| [aws_iam_role_policy_attachment.incubator_tf_plan_location_read](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.incubator_tf_plan_readonly](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_role_policy_attachment.incubator_tf_plan_secrets_read](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource | | [aws_iam_user.fangyiliu](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_user) | resource |