-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup.tf
42 lines (34 loc) · 1.07 KB
/
backup.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" "cattle_resources_system" {
provider = kubernetes.rancher_cluster
metadata {
name = "cattle-resources-system"
}
lifecycle {
ignore_changes = [
metadata.0.annotations,
metadata.0.labels
]
}
}
resource "helm_release" "rancher_backup_crd" {
provider = helm.rancher_cluster
count = var.rancher_backup_enabled ? 1 : 0
name = "rancher-backup-crd"
namespace = kubernetes_namespace.cattle_resources_system.metadata.0.name
repository = "https://charts.rancher.io"
chart = "rancher-backup-crd"
version = var.rancher_backup_chart_version
}
resource "helm_release" "rancher_backup" {
provider = helm.rancher_cluster
count = var.rancher_backup_enabled ? 1 : 0
name = "rancher-backup"
namespace = kubernetes_namespace.cattle_resources_system.metadata.0.name
repository = "https://charts.rancher.io"
chart = "rancher-backup"
version = var.rancher_backup_chart_version
values = var.rancher_backup_chart_values
depends_on = [
helm_release.rancher_backup_crd
]
}