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

civo_kubernetes_cluster broken in 1.0.2 #104

Closed
dirsigler opened this issue Nov 2, 2021 · 2 comments
Closed

civo_kubernetes_cluster broken in 1.0.2 #104

dirsigler opened this issue Nov 2, 2021 · 2 comments

Comments

@dirsigler
Copy link

There seems to be a big fuckup with the civo_kubernetes_cluster in the Civo Terraform Provider Version 1.0.2

If you use the Civo Provider Version 1.0.2 and want to create a Kubernetes Cluster you receive following error:

civo_network.cluster_network: Refreshing state... [id=1dff45ff-2a28-4b66-aa07-9c83c887b7bb]
civo_firewall.cluster_firewall: Refreshing state... [id=fdc9d187-435f-44c9-90cd-13dbfaf8e8fa]
civo_kubernetes_cluster.k3s_cluster: Refreshing state... [id=ff87caa7-2313-463f-9f17-3056d678a671]
╷
│ Error: [ERR] error retrieving the pool for kubernetes cluster error: &errors.errorString{s:"Invalid address to set: []string{\"pools\", \"0\", \"id\"}"}
│
│   with civo_kubernetes_cluster.k3s_cluster,
│   on main.tf line 18, in resource "civo_kubernetes_cluster" "k3s_cluster":
│   18: resource "civo_kubernetes_cluster" "k3s_cluster" {
│

You can test that easily out with:

terraform {
  required_version = "~> 1.0"
  required_providers {
    civo = {
      source  = "civo/civo"
      version = "1.0.1"
    }
  }
}
provider "civo" {
  region = "FRA1"
  token  = var.CIVO_TOKEN
}

variable "CIVO_TOKEN" {
  type        = string
  description = "API Token used for Civo Cloud."
}

resource "civo_network" "cluster_network" {
  label  = "test-3-vpc"
  region = "FRA1"
}

resource "civo_firewall" "cluster_firewall" {
  name       = "test-3-fw"
  region     = "FRA1"
  network_id = civo_network.cluster_network.id
  depends_on = [civo_network.cluster_network]
}

resource "civo_kubernetes_cluster" "k3s_cluster" {
  name             = "test-3-k3s"
  num_target_nodes = 3
  target_nodes_size = "g3.k3s.xsmall"
  applications      = "-Traefik"
  firewall_id       = civo_firewall.cluster_firewall.id
  network_id        = civo_network.cluster_network.id
  region            = "FRA1"
}

If you use above configuration you can create the setup without any problems.
Then change the Provider Version to 1.0.2 and terraform init -upgrade.
During the apply you receive above error.

You can also right away use Version 1.0.2 and instantly receive the error.

@alejandrojnm
Copy link
Member

Checking now

@philipsahli
Copy link

I received the same error and gladly using version 1.0.1 cluster creation works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants