Skip to content

Commit bb8116c

Browse files
[PRMT-2395] Add missing CIEnvLinker permissions
1 parent f9b2a7a commit bb8116c

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

terraform-cross-account/iam-ci/iam_gocd.tf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,21 @@ data "aws_iam_policy_document" "cross_ci_ssm" {
4343
statement {
4444
effect = "Allow"
4545
actions = [
46-
"ssm:GetParameter"
46+
"ssm:GetParameter*",
47+
"ssm:ListTagsForResource",
48+
"ssm:PutParameter",
49+
"ssm:AddTagsToResource"
4750
]
4851
resources = ["arn:aws:ssm:*:327778747031:parameter/*"]
4952
}
53+
54+
statement {
55+
effect = "Allow"
56+
actions = [
57+
"ssm:DescribeParameters",
58+
]
59+
resources = ["arn:aws:ssm:*:327778747031:*"]
60+
}
5061
}
5162

5263
resource "aws_iam_role_policy_attachment" "ci_to_env_linker_write" {
@@ -77,9 +88,10 @@ data "aws_iam_policy_document" "cross_ci_write" {
7788
actions = [
7889
"route53:DisassociateVPCFromHostedZone",
7990
"route53:AssociateVPCWithHostedZone",
91+
"route53:ListTagsForResource",
8092
"route53:ChangeResourceRecordSets",
8193
"route53:DeleteVPCAssociationAuthorization",
82-
"route53:CreateVPCAssociationAuthorization"
94+
"route53:CreateVPCAssociationAuthorization",
8395
]
8496
resources = ["arn:aws:route53:::hostedzone/*"]
8597
}

terraform/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ provider "aws" {
88
region = var.region
99
assume_role {
1010
role_arn = "arn:aws:iam::${var.common_account_id}:role/${var.common_account_role}"
11-
session_name = "common-dev-cross-account"
11+
session_name = "common-${var.environment}-cross-account"
1212
}
1313
}
1414

0 commit comments

Comments
 (0)