diff --git a/main.tf b/main.tf index 4ab61dc..834a352 100644 --- a/main.tf +++ b/main.tf @@ -41,6 +41,10 @@ resource "argocd_application" "this" { metadata { name = var.destination_cluster != "in-cluster" ? "longhorn-${var.destination_cluster}" : "longhorn" namespace = var.argocd_namespace + labels = merge({ + "application" = "longhorn" + "cluster" = var.destination_cluster + }, var.argocd_labels) } timeouts { diff --git a/variables.tf b/variables.tf index 93cb9b4..6b3777d 100644 --- a/variables.tf +++ b/variables.tf @@ -32,6 +32,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