Skip to content

Commit

Permalink
Fix/geodb role permissions (#468)
Browse files Browse the repository at this point in the history
* fix: add policy to role

* fix: attach the policy

* fix: resources

* fix: fmt

* fix role
  • Loading branch information
gcharest authored Apr 19, 2024
1 parent a5667f7 commit 0630068
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion terraform/oidc_roles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module "gh_oidc_roles" {

}

# policy to allow publishing techdocs to S3 bucket
data "aws_iam_policy_document" "publish_techdocs" {
statement {
effect = "Allow"
Expand All @@ -36,3 +35,14 @@ data "aws_iam_policy_document" "publish_techdocs" {
]
}
}

resource "aws_iam_policy" "geodb_refresh_policy" {
name = "geodb_refresh_policy"
description = "Policy to allow the Geodb Refresh role to publish to the target bucket"
policy = data.aws_iam_policy_document.publish_techdocs.json
}

resource "aws_iam_role_policy_attachment" "geodb_refresh_attachment" {
role = local.geodb_name
policy_arn = aws_iam_policy.geodb_refresh_policy.arn
}

0 comments on commit 0630068

Please sign in to comment.