-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
61 lines (55 loc) · 1.28 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
terraform {
required_providers {
# Kubernetes provider
kubernetes = {
source = "hashicorp/kubernetes"
}
# Helm provider
helm = {
source = "hashicorp/helm"
}
}
}
# Kubernetes provider configuration
provider "kubernetes" {
config_path = "~/.kube/config"
config_context = "docker-desktop"
}
# Helm provider configuration
provider "helm" {
# Local Kubernetes cluster from Docker Desktop
kubernetes {
# Load the kubeconfig from your home directory
config_path = "~/.kube/config"
}
}
# Install cert-manager helm chart using terraform
resource "helm_release" "cert_manager" {
name = "cert-manager"
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = "v1.13.0"
namespace = "cert-manager"
create_namespace = "true"
set {
name = "installCRDs"
value = "true"
}
set {
name = "prometheus.enabled"
value = "false"
}
}
resource "helm_release" "cert_manager_dependents" {
name = "cert-manager-depenedents"
chart = "cert-manager-depenedents"
keyring = ""
repository = "charts/"
max_history = "5"
values = [
file("charts/cert-manager-depenedents/values.yaml"),
]
depends_on = [
helm_release.cert_manager,
]
}