-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
42 lines (36 loc) · 855 Bytes
/
main.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
35
36
37
38
39
40
41
42
resource "kubernetes_namespace" "velero" {
metadata {
name = "velero"
}
lifecycle {
ignore_changes = [
metadata[0].annotations,
metadata[0].labels
]
}
}
resource "kubernetes_secret" "velero_s3_credentials" {
metadata {
name = "velero-s3-credentials"
namespace = kubernetes_namespace.velero.metadata.0.name
}
data = {
cloud = var.velero_s3_credentials
}
}
resource "helm_release" "velero" {
depends_on = [kubernetes_secret.velero.minio]
repository = var.velero.repository
name = var.velero.name
chart = var.velero.chart
version = var.velero.chart_version
namespace = kubernetes_namespace.velero.metadata.0.name
dynamic "set" {
for_each = var.velero.helm_release_params
content {
name = set.key
type = set.value["type"]
value = set.value["value"]
}
}
}