Skip to content

Commit

Permalink
feat: add standard variables and variable to add labels to Argo CD app
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Oct 19, 2023
1 parent 143598b commit 02aff70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 02aff70

Please sign in to comment.