-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
39 lines (31 loc) · 1.06 KB
/
main.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
provider "civo" {
token = var.api_token
}
# uncomment this to make this and command module block
# see terrform init go through
# data "civo_kubernetes_version" "stable" {
# filter {
# key = "type"
# values = ["stable"]
# }
# }
# resource "civo_kubernetes_cluster" "gloo" {
# for_each = var.gloo_clusters
# name = "gloo-${each.key}"
# region = each.value.region
# num_target_nodes = each.value.num_nodes
# target_nodes_size = each.value.target_nodes_size
# tags = join(",", ["gloo", each.value.role])
# applications = join(",", each.value.apps)
# kubernetes_version = element(data.civo_kubernetes_version.stable.versions, 0).version
# }
module "k3s" {
source = "./modules/k3s"
for_each = var.gloo_clusters
gloo_name = "gloo-${each.key}"
gloo_region = each.value.region
gloo_num_nodes = each.value.num_nodes
gloo_target_nodes_size = each.value.target_nodes_size
gloo_role = each.value.role
applications = each.value.apps
}