Skip to content

Instantly share code, notes, and snippets.

@nicosingh
Last active May 10, 2023 19:41
Show Gist options
  • Save nicosingh/bb6f32e04abaf058c886b8b816e26815 to your computer and use it in GitHub Desktop.
Save nicosingh/bb6f32e04abaf058c886b8b816e26815 to your computer and use it in GitHub Desktop.
# create some variables
variable "namespaces" {
type = list(string)
description = "List of namespaces to be created in our EKS Cluster."
}
# create all Namespaces into EKS
resource "kubernetes_namespace" "eks_namespaces" {
for_each = toset(var.namespaces)
metadata {
annotations = {
name = each.key
}
name = each.key
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment