Skip to content

Cluster admin roles #3

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cluster-admin.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# patch-aws-auth.tf
module "cluster-admin" {
source = "git@github.e.it.census.gov:terraform-modules/aws-eks.git//patch-aws-auth?ref=2.2.0"
profile = var.aws_sso_profile
cluster_name = var.cluster_name
aws_auth_roles = var.aws_auth_roles
keep_temporary_files = var.keep_temporary_files
}
31 changes: 31 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,37 @@ variable "operators_ns" {
default = "operators"
}

variable "aws_auth_roles" {
description = "List of role maps to add to the aws-auth configmap"
type = list(any)
default = [
{
rolearn : "arn:aws-us-gov:iam::224384469011:role/AWSReservedSSO_inf-admin-t3_b200ae7af469cdc8"
aws_rolename : ""
username : "admin"
groups = ["system:masters"]
},
{
rolearn : "arn:aws-us-gov:iam::224384469011:role/AWSReservedSSO_inf-admin-t2_f3912d726991bbfa"
aws_rolename : ""
username : "admin"
groups = ["system:masters"]
Comment on lines +79 to +90
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not hardcode role ARNs here, especially SSO roles. This is not at all portable.

}
]
}

variable "aws_sso_profile" {
description = "sso profile"
type = string
default = "224384469011-lab-dev-gov.inf-admin-t3"
}

variable "keep_temporary_files" {
description = "whether to keep temp files while creating aws_auth_roles"
type = bool
default = false
}

###################################################################
# Common variables
###################################################################
Expand Down