Skip to content

Commit 4befc1a

Browse files
committed
add templated apps
1 parent 31bfd2c commit 4befc1a

2 files changed

Lines changed: 38 additions & 6 deletions

File tree

argocd-bootstrap/main.tf

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,34 @@ resource "argocd_application" "app-of-components" {
9292
recurse = var.source_directory_recursive
9393
}
9494
}
95+
}
96+
depends_on = [argocd_project.projects]
9597

96-
# sync_policy {
97-
# automated {
98-
# prune = true
99-
# self_heal = true
98+
}
10099

101-
# }
102-
# }
100+
101+
resource "argocd_application" "templated-apps" {
102+
metadata {
103+
name = "templated-apps"
104+
namespace = "argocd"
105+
labels = {
106+
cluster = "in-cluster"
107+
}
108+
}
109+
110+
spec {
111+
destination {
112+
name = "in-cluster"
113+
}
114+
project = "templated-apps"
115+
116+
source {
117+
repo_url = var.source_repo_url
118+
path = "templated_teams"
119+
directory {
120+
recurse = false
121+
}
122+
}
103123
}
104124
depends_on = [argocd_project.projects]
105125

argocd-bootstrap/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,17 @@ variable "project_spaces" {
9494
kind = "*"
9595
}]
9696
}
97+
"templated" = {
98+
"name" = "templated-apps"
99+
"description" = "build from git generator"
100+
"destinations" = [{
101+
name = "*"
102+
namespace = "*"
103+
}]
104+
"cluster-allows" = [{
105+
group = "*"
106+
kind = "*"
107+
}]
108+
}
97109
}
98110
}

0 commit comments

Comments
 (0)