Skip to content

Instantly share code, notes, and snippets.

@Pelirrojo
Created April 21, 2023 16:56
Show Gist options
  • Save Pelirrojo/6e4fd98be15c0472f3dc6187c162e1a1 to your computer and use it in GitHub Desktop.
Save Pelirrojo/6e4fd98be15c0472f3dc6187c162e1a1 to your computer and use it in GitHub Desktop.
EKS Blueprints Example 3
# Complete file at https://github.com/Cloud-DevOps-Labs/kubernetes-in-aws-the-easy-way/blob/workshop/IaC/locals.tf
locals {
name = basename(path.cwd)
region = data.aws_region.current.name
cluster_version = "1.23"
vpc_cidr = "10.0.0.0/16"
azs = slice(data.aws_availability_zones.available.names, 0, 3)
node_group_name = "managed-ondemand"
env = "dev"
#---------------------------------------------------------------
# ARGOCD ADD-ON APPLICATION
#---------------------------------------------------------------
addon_application = {
path = "chart"
repo_url = "https://github.com/aws-samples/eks-blueprints-add-ons.git"
add_on_application = true
}
#---------------------------------------------------------------
# ARGOCD WORKLOAD APPLICATION
#---------------------------------------------------------------
workload_repo = "https://github.com/Cloud-DevOps-Labs/kubernetes-in-aws-workload-gitops-management.git"
workload_application = {
path = "envs/dev"
repo_url = local.workload_repo
add_on_application = false
values = {
labels = {
env = local.env
myapp = "kubeflow"
}
spec = {
source = {
repoURL = local.workload_repo
}
blueprint = "terraform"
clusterName = local.name
#karpenterInstanceProfile = "${local.name}-${local.node_group_name}" # Activate to enable Karpenter manifests (only when Karpenter add-on will be enabled in the Karpenter module)
env = local.env
}
}
}
tags = {
Blueprint = local.name
GithubRepo = "github.com/aws-ia/terraform-aws-eks-blueprints"
Owner = "Manuel de Paz"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment