ionos-cloud/terraform-provider-ionoscloud

K8s worker node persistent route

eliasay opened this issue · 8 comments

Description

Adding routes in k8s node_pool.
example
resource "ionoscloud_k8s_node_pool" "dev_node_pool" { name = "dev-pool" k8s_version = "1.21.4" lans { id = ionoscloud_lan.private_vpn.id }
Results error
Error: Unsupported block type on main.tf line 124, in resource "ionoscloud_k8s_node_pool" "dev_node_pool": 124: lans { Blocks of type "lans" are not expected here. Did you mean to define argument "lans"? If so, use the equals sign to assign it a value.

Expected behavior

i expected adding routes to worker nodes .

Environment

Terraform version:
v0.15.5

Provider version:
5.2.21

OS:
linux

Hi @eliasay,

As I can see you're using version 5.2.21 of our terraform provider, so please check the usage example from here https://registry.terraform.io/providers/ionos-cloud/ionoscloud/5.2.21/docs/resources/k8s_node_pool, since the format you're using now for lan is specific for version 6.0.0-beta.x.

If you encounter any more problems please do not hesitate to contact us.

Hi@IuliaBlindu,

that's right i used 6.0.0-beta.14 version and the terraform manifests executed without error but still not applied on the worker nodes

resource "ionoscloud_k8s_node_pool" "dev_node_pool" { name = "dev-pool" k8s_version = "1.21.4" lans { id = ionoscloud_lan.private_lan.id routes { network = "10.0.3.0/24" gateway_ip = "10.15.78.16" } }

Thank you for reporting this problem. We will investigate this and come back to you shortly.

Hi @eliasay,

Could you give me some more information about where do you check if the route is applied on the worker nodes? I've tested version 6.0.0-beta.14 of the provider and I've not encountered this issue.

Also, can you please try to do this again? It is possible that the problem was temporarily due to some problem with managed k8s and now your plan may work just fine.

Hi @IuliaBlindu,

Actually the problem is when updating the terraform provider from 5.2.x to 6.0.0-beta.14 by executing terraform init -upgrade ,so when adding the route block in the nodepool resource i got an error

@eliasay indeed, doing the upgrade I've managed to reproduce the issue. Thanks for the details!

Are you receiving the missing expectederror or do you have another one? If there is another error, please give me more details.

Either way, we will take care of this problem. Thanks again!

@IuliaBlindu exactly iam receiving the missing expected error

Hi @eliasay please try v6.0.0. It should have this issue solved