-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitlab.tf
34 lines (31 loc) · 1.05 KB
/
gitlab.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
resource "kubernetes_namespace" "gitlab-namespace" {
count = var.gitlabrunner ? 1 : 0
metadata {
name = "gitlab"
}
}
resource "helm_release" "gitlab" {
name = "gitlab"
repository = "https://charts.gitlab.io/"
chart = "gitlab"
version = "8.8.0"
namespace = "gitlab"
count = var.gitlabrunner ? 1 : 0
values = [file("${path.module}/values/gitlab.yaml")]
depends_on = [ kubernetes_namespace.gitlab-namespace, resource.kubectl_manifest.gitlab-passwd-token]
timeout = "600"
set {
name = "timeout"
value = "600s"
}
}
resource "kubectl_manifest" "gitlab-passwd-token" {
yaml_body = file("${path.module}/manifests/gitlabpasswdtoken.yaml")
# count = length(data.kubectl_filename_list.gitlab-passwd-token.matches)
# yaml_body = file(element(data.kubectl_filename_list.gitlab-passwd-token.matches, count.index))
depends_on = [ kubernetes_namespace.gitlab-namespace ]
count = var.gitlabrunner ? 1 : 0
}
# data "kubectl_filename_list" "gitlab-passwd-token" {
# pattern = "./manifests/gitlab-passwd-token.yaml"
# }