Skip to content

Commit 0606c9b

Browse files
authored
Merge pull request #8 from datafold/gerard-cx-2579-improve-admin-access-across-aws
feat: Add auth roles for authentication
2 parents 0ad4550 + 70d7ddf commit 0606c9b

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ module "eks" {
108108
manage_aws_auth_configmap = var.manage_aws_auth_configmap
109109
aws_auth_users = var.aws_auth_users
110110
aws_auth_accounts = var.aws_auth_accounts
111+
aws_auth_roles = var.aws_auth_roles
111112
tags = var.tags
112113
backend_app_port = var.backend_app_port
113114
rds_port = var.rds_port

modules/eks/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ module "eks" {
100100
create_aws_auth_configmap = var.create_aws_auth_configmap
101101
manage_aws_auth_configmap = var.manage_aws_auth_configmap
102102

103-
aws_auth_roles = [
103+
aws_auth_roles = concat([
104104
{
105105
rolearn = aws_iam_role.eks_cluster_role.arn
106106
username = "eks_cluster_role"
107107
groups = ["system:masters"]
108108
},
109-
]
109+
], var.aws_auth_roles)
110110

111111
aws_auth_users = var.aws_auth_users
112112
aws_auth_accounts = var.aws_auth_accounts

modules/eks/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ variable "aws_auth_accounts" {
9393
default = []
9494
}
9595

96+
variable "aws_auth_roles" {
97+
type = list(any)
98+
default = []
99+
}
100+
96101
variable "tags" {
97102
type = any
98103
default = {}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,12 @@ variable "aws_auth_accounts" {
525525
description = "List of account maps to add to the aws-auth configmap"
526526
}
527527

528+
variable "aws_auth_roles" {
529+
type = list(any)
530+
default = []
531+
description = "List of role maps to add to the aws-auth configmap"
532+
}
533+
528534
variable "tags" {
529535
type = any
530536
default = {}

0 commit comments

Comments
 (0)