2024-04-17 21:28:39 -04:00
|
|
|
terraform {
|
|
|
|
required_version = ">= 1.8.0"
|
|
|
|
required_providers {
|
|
|
|
vault = {
|
|
|
|
source = "hashicorp/vault"
|
|
|
|
version = ">= 4.2.0"
|
|
|
|
}
|
|
|
|
vultr = {
|
|
|
|
source = "vultr/vultr"
|
|
|
|
version = ">= 2.19.0"
|
|
|
|
}
|
2024-04-19 10:10:01 -04:00
|
|
|
kubernetes = {
|
|
|
|
source = "hashicorp/kubernetes"
|
|
|
|
version = ">= 2.29.0"
|
|
|
|
}
|
2024-04-17 21:28:39 -04:00
|
|
|
}
|
|
|
|
backend "local" {
|
|
|
|
path = "/home/michael/Nextcloud/Backups/tfstate/vultr.tfstate"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "vault" {
|
|
|
|
# Export the vault token to the environment variable VAULT_TOKEN
|
|
|
|
address = "https://vault.balsillie.house"
|
|
|
|
}
|
|
|
|
|
|
|
|
data "vault_kv_secret" "vultr" {
|
|
|
|
path = "kv/vultr"
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "vultr" {
|
|
|
|
api_key = data.vault_kv_secret.vultr.data.api_key
|
|
|
|
rate_limit = 100
|
|
|
|
retry_limit = 3
|
|
|
|
}
|
2024-04-19 10:10:01 -04:00
|
|
|
|
|
|
|
provider "kubernetes" {
|
|
|
|
# # host = vultr_kubernetes.k8s.endpoint
|
|
|
|
# # client_certificate = vultr_kubernetes.k8s.client_certificate
|
|
|
|
# # client_key = vultr_kubernetes.k8s.client_key
|
|
|
|
# # cluster_ca_certificate = vultr_kubernetes.k8s.cluster_ca_certificate
|
|
|
|
config_path = pathexpand("~/.kube/vultr")
|
|
|
|
}
|