mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-25 17:55:06 +01:00
8fcf7c4e1c
chore(deps): update terraform helm to v2.16.0
77 lines
2.6 KiB
HCL
77 lines
2.6 KiB
HCL
terraform {
|
|
|
|
required_version = ">= 0.13.0"
|
|
|
|
required_providers {
|
|
civo = {
|
|
source = "civo/civo"
|
|
version = "~> 1.1.0"
|
|
}
|
|
helm = {
|
|
source = "hashicorp/helm"
|
|
version = "2.16.0"
|
|
}
|
|
kubernetes = {
|
|
source = "hashicorp/kubernetes"
|
|
version = "2.33.0"
|
|
}
|
|
kubectl = {
|
|
source = "gavinbunney/kubectl"
|
|
version = "1.14.0"
|
|
}
|
|
cloudflare = {
|
|
source = "cloudflare/cloudflare"
|
|
version = "~> 4.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
variable "civo_token" {
|
|
type = string
|
|
}
|
|
|
|
variable "cloudflare_email" {
|
|
type = string
|
|
}
|
|
|
|
variable "cloudflare_api_key" {
|
|
type = string
|
|
}
|
|
|
|
provider "civo" {
|
|
token = var.civo_token
|
|
|
|
# TODO: (optional) change region to your desired datacenter location
|
|
# ---
|
|
# region = "FRA1"
|
|
}
|
|
|
|
provider "helm" {
|
|
kubernetes {
|
|
host = "${yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).clusters.0.cluster.server}"
|
|
client_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).users.0.user.client-certificate-data)}"
|
|
client_key = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).users.0.user.client-key-data)}"
|
|
cluster_ca_certificate ="${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).clusters.0.cluster.certificate-authority-data)}"
|
|
}
|
|
}
|
|
|
|
provider "kubernetes" {
|
|
host = "${yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).clusters.0.cluster.server}"
|
|
client_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).users.0.user.client-certificate-data)}"
|
|
client_key = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).users.0.user.client-key-data)}"
|
|
cluster_ca_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).clusters.0.cluster.certificate-authority-data)}"
|
|
}
|
|
|
|
provider "kubectl" {
|
|
host = "${yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).clusters.0.cluster.server}"
|
|
client_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).users.0.user.client-certificate-data)}"
|
|
client_key = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).users.0.user.client-key-data)}"
|
|
cluster_ca_certificate = "${base64decode(yamldecode(civo_kubernetes_cluster.k8s_demo_1.kubeconfig).clusters.0.cluster.certificate-authority-data)}"
|
|
load_config_file = false
|
|
}
|
|
|
|
provider "cloudflare" {
|
|
email = var.cloudflare_email
|
|
api_key = var.cloudflare_api_key
|
|
}
|