diff --git a/main.tf b/main.tf index 7896ef7..9de9b2e 100644 --- a/main.tf +++ b/main.tf @@ -55,6 +55,10 @@ resource "argocd_application" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "ebs-csi-driver-${var.destination_cluster}" : "ebs-csi-driver" namespace = var.argocd_namespace + labels = merge({ + "application" = "ebs-csi-driver" + "cluster" = var.destination_cluster + }, var.argocd_labels) } timeouts { diff --git a/variables.tf b/variables.tf index 85be49e..f3dd22f 100644 --- a/variables.tf +++ b/variables.tf @@ -19,6 +19,12 @@ variable "argocd_project" { default = null } +variable "argocd_labels" { + description = "Labels to attach to the Argo CD Application resource." + type = map(string) + default = {} +} + variable "destination_cluster" { description = "Destination cluster where the application should be deployed." type = string