Skip to content

Commit 1325d40

Browse files
committed
Grant Terraform Cloud role access to Access Analyzer
This is required for TFC to manage Access Analyzer resources
1 parent d81c119 commit 1325d40

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

terraform/deployments/tfc-aws-config/aws_oidc.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ data "aws_iam_policy_document" "tfc_policy" {
3838
statement {
3939
resources = ["*"]
4040
actions = [
41+
"access-analyzer:*",
4142
"acm:*",
4243
"apigateway:*",
4344
"athena:*",
@@ -130,6 +131,11 @@ data "aws_iam_policy_document" "tfc_policy" {
130131
"arn:aws:iam::*:user/govuk-*-fastly-logs-athena-monitoring"
131132
]
132133
}
134+
statement {
135+
effect = "Allow"
136+
actions = ["iam:CreateServiceLinkedRole"]
137+
resources = ["arn:aws:iam::*:role/aws-service-role/access-analyzer.amazonaws.com/AWSServiceRoleForAccessAnalyzer"]
138+
}
133139
statement {
134140
effect = "Deny"
135141
resources = ["*"]
@@ -145,7 +151,6 @@ data "aws_iam_policy_document" "tfc_policy" {
145151
"iam:*Login*",
146152
"iam:*Group*",
147153
"iam:*PermissionsBoundary*",
148-
"iam:CreateServiceLinkedRole",
149154
]
150155
}
151156
}

0 commit comments

Comments
 (0)