-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprovider.tf
43 lines (37 loc) · 1.09 KB
/
provider.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
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = ">= 2.20.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.11.0"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.5.1"
}
}
}
provider "digitalocean" {}
data "digitalocean_kubernetes_cluster" "magento" {
depends_on = [module.kubernetes.cluster_id]
name = "${local.project.name}-magento-cluster"
}
provider "kubernetes" {
host = data.digitalocean_kubernetes_cluster.magento.endpoint
token = data.digitalocean_kubernetes_cluster.magento.kube_config[0].token
cluster_ca_certificate = base64decode(
data.digitalocean_kubernetes_cluster.magento.kube_config[0].cluster_ca_certificate
)
}
provider "helm" {
kubernetes {
host = data.digitalocean_kubernetes_cluster.magento.endpoint
token = data.digitalocean_kubernetes_cluster.magento.kube_config[0].token
cluster_ca_certificate = base64decode(
data.digitalocean_kubernetes_cluster.magento.kube_config[0].cluster_ca_certificate
)
}
}