diff --git a/ec2_node_class.yaml.tpl b/ec2_node_class.yaml.tpl index 74c4172..2a8deef 100644 --- a/ec2_node_class.yaml.tpl +++ b/ec2_node_class.yaml.tpl @@ -58,3 +58,6 @@ spec: # Optional, configures detailed monitoring for the instance detailedMonitoring: true + + # Add finops tags to karpenter provisioned nodes + tags: ${tags} diff --git a/main.tf b/main.tf index 8831008..2860b72 100644 --- a/main.tf +++ b/main.tf @@ -200,6 +200,7 @@ resource "kubectl_manifest" "karpenter_ec2_node_class" { ] yaml_body = templatefile("${path.module}/ec2_node_class.yaml.tpl", { cluster_name = var.cluster_name + tags = jsonencode(var.tags) amd_ami_family = "Bottlerocket" amd_ami_alias = "bottlerocket" })