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

Cluster CIDR is can not be set when it was empty in the beginning #244

Open
ajfriesen opened this issue Nov 30, 2023 · 0 comments
Open

Cluster CIDR is can not be set when it was empty in the beginning #244

ajfriesen opened this issue Nov 30, 2023 · 0 comments

Comments

@ajfriesen
Copy link
Contributor

Created a cluster initially without CIDR like so:

resource "gridscale_k8s" "k8s" {
  name    = var.cluster_name
  release = var.kubernetes_version
  node_pool {
    name         = "workers"
    node_count   = var.worker_node_count
    cores        = var.worker_node_cores
    memory       = var.worker_node_memory
    storage      = var.worker_node_storage_size
    storage_type = var.worker_node_storage_type
    cluster_cidr = ""
  }

Cluster will be created with the default CIDR of 10.244.0.0/16

Later when I want to define the CIDR block to the same value

resource "gridscale_k8s" "k8s" {
  name    = var.cluster_name
  release = var.kubernetes_version
  node_pool {
    name         = "workers"
    node_count   = var.worker_node_count
    cores        = var.worker_node_cores
    memory       = var.worker_node_memory
    storage      = var.worker_node_storage_size
    storage_type = var.worker_node_storage_type
    cluster_cidr = "10.244.0.0/16"
  }

I will get an error:

│ Error: update k8s (8182cef8-1f28-4b83-b2ff-c52b60ce8258) resource - error: Status code: 400. Error: {'type': 'HTTPError', 'status_code': 400, 'message': "(400, 'Parameter k8s_cluster_cidr is immutable')"}. Request UUID: 187fda47-f91b-455e-b619-8f94a49b0c1a. 
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

1 participant