forked from blue-harvest/terraform-aws-blueharvest-eks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelm.tf
46 lines (37 loc) · 1.18 KB
/
helm.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
43
44
45
46
resource "null_resource" "helm_charts" {
depends_on = ["module.eks", "module.vpc"]
triggers {
cluster_endpoint = "${module.eks.cluster_endpoint}"
}
provisioner "local-exec" {
working_dir = "${path.module}"
command = "chmod u+x ./scripts/install.sh"
}
provisioner "local-exec" {
working_dir = "${path.module}"
command = "./scripts/install.sh"
interpreter = ["/bin/sh", "-c"]
environment {
CLUSTER_NAME = "${var.cluster_name}"
CLUSTER_ZONE = "${var.cluster_zone}"
CLUSTER_ZONE_ID = "${var.cluster_zone_id}"
LETSENCRYPT_EMAIL = "${var.letsencrypt_email}"
LETSENCRYPT_PRODUCTION = "${var.letsencrypt_production}"
KUBECONFIG = "${path.root}/kubeconfig_${var.cluster_name}"
}
}
provisioner "local-exec" {
working_dir = "${path.module}"
when = "destroy"
command = "chmod u+x ./scripts/uninstall.sh"
}
provisioner "local-exec" {
working_dir = "${path.module}"
when = "destroy"
command = "./scripts/uninstall.sh"
interpreter = ["/bin/sh", "-c"]
environment {
KUBECONFIG = "${path.root}/kubeconfig_${var.cluster_name}"
}
}
}