Skip to content

Commit 426e4ec

Browse files
authored
Merge pull request #8536 from ameukam/aws-kops-ci-user
AWS: setup a IAM user for kOps CI
2 parents c2dba7d + 72990d2 commit 426e4ec

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

infra/aws/terraform/kops-infra-ci/eks.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ module "eks" {
4444
cloudwatch_log_group_retention_in_days = 30
4545

4646
cluster_addons = {
47-
amazon-cloudwatch-observability = {
48-
most_recent = true
49-
}
5047
coredns = {
5148
most_recent = true
5249
}

infra/aws/terraform/kops-infra-ci/iam.tf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,33 @@ resource "aws_iam_role_policy_attachment" "eks_pod_identity_policy" {
8787
policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
8888
role = aws_iam_role.eks_pod_identity_role.name
8989
}
90+
91+
module "ci_iam_group" {
92+
providers = { aws = aws.kops-infra-ci }
93+
source = "terraform-aws-modules/iam/aws//modules/iam-group-with-policies"
94+
version = "~> 5.60"
95+
name = "ci-admins"
96+
97+
group_users = [
98+
module.kops_ci_user.iam_user_name,
99+
]
100+
custom_group_policy_arns = [
101+
"arn:aws:iam::aws:policy/AdministratorAccess",
102+
]
103+
104+
tags = var.tags
105+
}
106+
107+
module "kops_ci_user" {
108+
providers = { aws = aws.kops-infra-ci }
109+
source = "terraform-aws-modules/iam/aws//modules/iam-user"
110+
version = "~> 5.60"
111+
112+
name = "kops-ci-user"
113+
create_iam_user_login_profile = false
114+
115+
force_destroy = true
116+
password_reset_required = false
117+
118+
tags = var.tags
119+
}

infra/aws/terraform/kops-infra-ci/pod-identity.tf

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)