Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "terraform init" issue #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ module "k3s" {
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
}
# applications = each.value.apps
gloo_apps = []
gloo_clusterz = var.gloo_clusters
}
19 changes: 12 additions & 7 deletions modules/k3s/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
variable "gloo_clusterz" {
type = map(any)
description = "Gloo Clusters"
}

variable gloo_name {
type = string
description = "description"
Expand Down Expand Up @@ -37,13 +42,13 @@ data "civo_kubernetes_version" "stable" {
}

resource "civo_kubernetes_cluster" "gloo" {
for_each = var.gloo_clusters
for_each = var.gloo_clusterz

name = "gloo-${var.gloo_name}"
region = gloo_region
num_target_nodes = gloo_num_nodes
target_nodes_size = gloo_target_nodes_size
tags = join(",", ["gloo",gloo_role])
applications = join(",", gloo_apps)
region = var.gloo_region
num_target_nodes = var.gloo_num_nodes
target_nodes_size = var.gloo_target_nodes_size
tags = join(",", ["gloo",var.gloo_role])
applications = join(",", var.gloo_apps)
kubernetes_version = element(data.civo_kubernetes_version.stable.versions, 0).version
}
}
8 changes: 8 additions & 0 deletions modules/k3s/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
civo = {
source = "civo/civo"
version = "0.10.9"
}
}
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ variable "gloo_clusters" {
apps = ["-Traefik"]
}
}
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {

civo = {
source = "civo/civo"
source = "civo/civo"
version = "0.10.9"
}

Expand Down