Repository navigation
Let incubator-tf-plan read Amazon Location resources - #230
Merged
Merged
Conversation
Contributor
|
Terraform plan in terraform Plan: 2 to add, 0 to change, 0 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_iam_role_policy_attachment.incubator_tf_plan_location_read will be created
+ resource "aws_iam_role_policy_attachment" "incubator_tf_plan_location_read" {
+ id = (known after apply)
+ policy_arn = (known after apply)
+ role = "incubator-tf-plan"
}
# module.aws_custom_policies.aws_iam_policy.custom_policy["IncubatorTfPlanLocationRead"] will be created
+ resource "aws_iam_policy" "custom_policy" {
+ arn = (known after apply)
+ attachment_count = (known after apply)
+ description = "Allows incubator tf plan role to read Amazon Location resources during terraform plan"
+ id = (known after apply)
+ name = "IncubatorTfPlanLocationRead"
+ name_prefix = (known after apply)
+ path = "/"
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "geo:Describe*",
+ "geo:List*",
]
+ Effect = "Allow"
+ Resource = "*"
+ Sid = "AllowLocationReadForTerraformPlan"
},
]
+ Version = "2012-10-17"
}
)
+ policy_id = (known after apply)
+ tags_all = {
+ "managed-by" = "terraform-devops-security"
}
}
Plan: 2 to add, 0 to change, 0 to destroy.✅ Plan applied in Apply Terraform changes on merge #61 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every incubator Terraform plan has failed since hackforla/incubator#290 created the Food Oasis place indexes:
incubator-tf-planreads AWS through the managedReadOnlyAccesspolicy, which grants nogeo:actions. The apply role has AdministratorAccess, so the apply worked, but every plan after it has to read the indexes and can't.IncubatorTfPlanLocationRead(geo:Describe*,geo:List*), attached toincubator-tf-plan. The wildcards also cover the Location resources Deploy the Food Oasis staging service incubator#281 and #282 will add.tf-plan-scoped.json, because the plan and apply workflows only run for.tfchanges. A JSON-only edit would never be planned or applied.Expected plan: 2 to add (the policy and its attachment), 0 to change, 0 to destroy.
After this merges and applies, re-run the failed Terraform Plan job on hackforla/incubator#291 and confirm it passes.