Skip to content

Commit ab1fb98

Browse files
goruhaaknysh
authored andcommitted
Grant premissions for app secrets group (#29)
* Grant premissions for app secrets group * Address PR comments * Address PR comments * Address PR comments
1 parent f3536ae commit ab1fb98

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

aws/chamber/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ variable "account_id" {
2828
description = "AWS account ID"
2929
}
3030

31+
variable "parameter_groups" {
32+
type = "list"
33+
description = "Parameter group names"
34+
default = ["kops", "app"]
35+
}
36+
3137
provider "aws" {
3238
assume_role {
3339
role_arn = "${var.aws_assume_role_arn}"

aws/chamber/user.tf

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Chamber user for CI/CD systems that cannot leverage IAM instance profiles
22
# https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-access.html
33
module "chamber_user" {
4-
source = "git::https://github.com/cloudposse/terraform-aws-iam-chamber-user.git?ref=tags/0.1.4"
5-
namespace = "${var.namespace}"
6-
stage = "${var.stage}"
7-
name = "chamber"
8-
attributes = ["codefresh"]
9-
kms_key_arn = "${module.chamber_kms_key.key_arn}"
10-
ssm_resources = ["${format("arn:aws:ssm:%s:%s:parameter/kops/*", var.region, var.account_id)}"]
4+
source = "git::https://github.com/cloudposse/terraform-aws-iam-chamber-user.git?ref=tags/0.1.5"
5+
namespace = "${var.namespace}"
6+
stage = "${var.stage}"
7+
name = "chamber"
8+
attributes = ["codefresh"]
9+
kms_key_arn = "${module.chamber_kms_key.key_arn}"
10+
11+
ssm_resources = [
12+
"${formatlist("arn:aws:ssm:%s:%s:parameter/%s/*", var.region, var.account_id, var.parameter_groups)}",
13+
]
1114
}
1215

1316
output "chamber_user_name" {

0 commit comments

Comments
 (0)