Skip to content

Commit

Permalink
new(tf): add EKS permissions for GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Feb 20, 2024
1 parent 5a7e666 commit 29f9b22
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/clusters/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module "eks" {
subnets = module.vpc.private_subnets
write_kubeconfig = true
map_users = var.eks_users
map_roles = var.eks_roles
enable_irsa = true
cluster_enabled_log_types = ["audit"]

Expand Down
16 changes: 16 additions & 0 deletions config/clusters/eks_variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,19 @@ variable "eks_users" {
}
]
}
variable "eks_roles" {
description = "Additional IAM roles to add to the aws-auth configmap."
type = list(object({
rolearn = string
username = string
groups = list(string)
}))

default = [
{
rolearn = "arn:aws:iam::292999226676:role/github_actions-test-infra-cluster"
username = "githubactions-test-infra-cluster"
groups = ["system:masters"]
},
]
}

0 comments on commit 29f9b22

Please sign in to comment.