diff --git a/.github/workflows/examples-complete.yaml b/.github/workflows/examples-complete.yaml index 1db2183..da08131 100644 --- a/.github/workflows/examples-complete.yaml +++ b/.github/workflows/examples-complete.yaml @@ -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" + } + } diff --git a/.github/workflows/examples-lacework.yaml b/.github/workflows/examples-lacework.yaml index 3e7e4a3..dcc3ad0 100644 --- a/.github/workflows/examples-lacework.yaml +++ b/.github/workflows/examples-lacework.yaml @@ -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" + } + } diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 3734d55..47f6ff7 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -73,6 +73,8 @@ module "k8s_platform" { name = "complete" + cluster_admins = var.cluster_admins + tags = { Environment = "sandbox" GithubRepo = "terraform-aws-kubernetes-platform" diff --git a/examples/complete/variables.tf b/examples/complete/variables.tf index 7ac6490..a8fa739 100644 --- a/examples/complete/variables.tf +++ b/examples/complete/variables.tf @@ -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 = {} +} diff --git a/examples/lacework/main.tf b/examples/lacework/main.tf index fe13507..8f94b7a 100644 --- a/examples/lacework/main.tf +++ b/examples/lacework/main.tf @@ -92,6 +92,8 @@ module "k8s_platform" { name = "lacework" + cluster_admins = var.cluster_admins + tags = { Environment = "sandbox" GithubRepo = "terraform-aws-kubernetes-platform" diff --git a/examples/lacework/variables.tf b/examples/lacework/variables.tf index 7ac6490..a8fa739 100644 --- a/examples/lacework/variables.tf +++ b/examples/lacework/variables.tf @@ -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 = {} +}