Skip to content

Commit

Permalink
fix: set cluster admin via workflow input
Browse files Browse the repository at this point in the history
  • Loading branch information
swibrow committed Apr 26, 2024
1 parent bbe730f commit 243e1e6
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/examples-complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ jobs:
with:
environment: examples
tf_dir: examples/complete
tf_vars: |
cluster_admins = {
sso = {
role_name = "aws-reserved/sso.amazonaws.com/eu-west-1/AWSReservedSSO_AWSAdministratorAccess_3cb2c900c0e65cd2"
}
cicd = {
role_name = "cicd-iac"
}
}
9 changes: 9 additions & 0 deletions .github/workflows/examples-lacework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@ jobs:
with:
environment: examples
tf_dir: examples/lacework
tf_vars: |
cluster_admins = {
sso = {
role_name = "aws-reserved/sso.amazonaws.com/eu-west-1/AWSReservedSSO_AWSAdministratorAccess_3cb2c900c0e65cd2"
}
cicd = {
role_name = "cicd-iac"
}
}
2 changes: 2 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ module "k8s_platform" {

name = "complete"

cluster_admins = var.cluster_admins

tags = {
Environment = "sandbox"
GithubRepo = "terraform-aws-kubernetes-platform"
Expand Down
9 changes: 9 additions & 0 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ variable "region" {
type = string
default = "eu-central-1"
}

variable "cluster_admins" {
description = "Map of IAM roles to add as cluster admins"
type = map(object({
role_name = string
kubernetes_groups = optional(list(string))
}))
default = {}
}
2 changes: 2 additions & 0 deletions examples/lacework/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ module "k8s_platform" {

name = "lacework"

cluster_admins = var.cluster_admins

tags = {
Environment = "sandbox"
GithubRepo = "terraform-aws-kubernetes-platform"
Expand Down
9 changes: 9 additions & 0 deletions examples/lacework/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ variable "region" {
type = string
default = "eu-central-1"
}

variable "cluster_admins" {
description = "Map of IAM roles to add as cluster admins"
type = map(object({
role_name = string
kubernetes_groups = optional(list(string))
}))
default = {}
}

0 comments on commit 243e1e6

Please sign in to comment.