-
Notifications
You must be signed in to change notification settings - Fork 13
/
istio.tf
79 lines (74 loc) · 1.64 KB
/
istio.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
resource "helm_release" "istio_base" {
name = "istio-base"
namespace = "istio-system"
chart = "base"
repository = "https://istio-release.storage.googleapis.com/charts"
version = "1.18.7"
create_namespace = true
values = [
<<EOF
EOF
]
depends_on = [
null_resource.core_addons
]
}
resource "helm_release" "issuer" {
name = "issuer"
namespace = "istio-system"
chart = "${path.module}/charts/issuer"
values = [
<<EOF
certEmailOwner: ${var.cert_email_owner}
hostedZoneId: ${var.hosted_zone_id}
hostname: ${var.host}
EOF
]
depends_on = [
helm_release.istio_base
]
}
resource "helm_release" "istiod" {
name = "istiod"
namespace = "istio-system"
chart = "istiod"
repository = "https://istio-release.storage.googleapis.com/charts"
version = "1.18.7"
create_namespace = true
values = [
<<EOF
EOF
]
depends_on = [
helm_release.issuer
]
}
resource "helm_release" "istio_ingressgateway" {
name = "istio-ingressgateway"
namespace = "istio-system"
chart = "gateway"
repository = "https://istio-release.storage.googleapis.com/charts"
version = "1.18.7"
values = [
<<EOF
service:
type: LoadBalancer
serviceAccount:
name: istio-ingressgateway-service-account
EOF
]
depends_on = [
helm_release.istiod
]
}
resource "null_resource" "istio" {
# triggers = {
# always_run = "${timestamp()}"
# }
provisioner "local-exec" {
command = "echo 'Istio is ready!'"
}
depends_on = [
helm_release.istio_ingressgateway
]
}