forked from digitalocean/mastodon-on-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
providers.tf
48 lines (44 loc) · 1.18 KB
/
providers.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
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
version = ">= 2.25.2"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.16.1"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.8.0"
}
}
}
locals {
doks_config = digitalocean_kubernetes_cluster.mastodon.kube_config[0].raw_config
doks_endpoint = digitalocean_kubernetes_cluster.mastodon.endpoint
doks_token = digitalocean_kubernetes_cluster.mastodon.kube_config[0].token
doks_ca_certificate = digitalocean_kubernetes_cluster.mastodon.kube_config[0].cluster_ca_certificate
}
provider "digitalocean" {
# Provider is configured using environment variables:
# DIGITALOCEAN_TOKEN
# SPACES_ACCESS_KEY_ID
# SPACES_SECRET_ACCESS_KEY
}
provider "kubernetes" {
host = local.doks_endpoint
token = local.doks_token
cluster_ca_certificate = base64decode(
local.doks_ca_certificate
)
}
provider "helm" {
kubernetes {
host = local.doks_endpoint
token = local.doks_token
cluster_ca_certificate = base64decode(
local.doks_ca_certificate
)
}
}