2021-02-12 21:24:13 +07:00
|
|
|
terraform {
|
2021-05-01 22:51:55 +07:00
|
|
|
# TODO (feature) Generate endpoint automatically (terragrunt for variable)
|
2021-04-24 18:04:26 +07:00
|
|
|
backend "etcdv3" {
|
2021-05-17 01:49:07 +07:00
|
|
|
endpoints = ["192.168.1.21:2379"]
|
2021-04-24 18:04:26 +07:00
|
|
|
lock = true
|
|
|
|
}
|
2021-02-12 21:51:19 +07:00
|
|
|
|
2021-05-02 23:07:16 +07:00
|
|
|
# TODO Better Terraform provider inheritance
|
2021-02-12 21:51:19 +07:00
|
|
|
required_providers {
|
|
|
|
lxd = {
|
|
|
|
source = "terraform-lxd/lxd"
|
|
|
|
version = "1.5.0"
|
|
|
|
}
|
2021-02-13 12:49:59 +07:00
|
|
|
|
|
|
|
rke = {
|
|
|
|
source = "rancher/rke"
|
|
|
|
version = "1.1.7"
|
|
|
|
}
|
2021-05-02 23:07:16 +07:00
|
|
|
|
|
|
|
helm = {
|
|
|
|
source = "hashicorp/helm"
|
|
|
|
version = "2.1.1"
|
|
|
|
}
|
2021-02-12 21:51:19 +07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "lxd" {
|
|
|
|
generate_client_certificates = true
|
|
|
|
accept_remote_certificate = true
|
2021-04-21 23:28:54 +07:00
|
|
|
|
|
|
|
lxd_remote {
|
|
|
|
name = "homelab"
|
|
|
|
scheme = "https"
|
|
|
|
address = var.lxd_address
|
|
|
|
password = var.lxd_password
|
|
|
|
default = true
|
|
|
|
}
|
2021-02-12 21:24:13 +07:00
|
|
|
}
|
2021-02-13 12:49:59 +07:00
|
|
|
|
|
|
|
provider "rke" {
|
|
|
|
debug = true
|
|
|
|
}
|