ionos-cloud/terraform-provider-ionoscloud

It is not possible to add a new private lan to the dataplatform cluster via Terraform

Opened this issue · 2 comments

Description

I adjusted the terraform code to add a newly created lan to the already existing dataplatform cluster and I found two different issues:

  1. It is not possible to add a private lan to the cluster without routes (In the documentation it is marked as optional): Error: an error occured while updating a Dataplatform Cluster: 422 Unprocessable Entity: {"httpStatus":422,"messages":[{"errorCode":"dsaas-400","message":"'Value is not nullable' caused by field /properties/lans/0/routes"}]}
  2. It is not possible to add a private lan to an existing cluster add all. Every time I try to add the private lan, the terraform pipeline reaches the timeout.

Here is the code for my Cluster:

data "ionoscloud_private_crossconnect" "main" {
name = "shared-xconn"
}

resource "ionoscloud_lan" "main" {
name = "lan"
datacenter_id = module.ionos_dc.datacenter_id
public = false
ipv6_cidr_block = "AUTO"
pcc = data.ionoscloud_private_crossconnect.main.id
}

resource "ionoscloud_dataplatform_cluster" "main" {
datacenter_id = var.datacenter_id
name = "sdp-cluster"

version = var.stackable_version

lans {
lan_id = ionoscloud_lan.main.id
dhcp = true
routes {
network = ionoscloud_lan.main.ipv6_cidr_block
gateway = "217.160.216.1"
}
}

maintenance_window {
day_of_the_week = "Sunday"
time = "09:00:00"
}
}

Expected behavior

It should create the lan and add it even if there are no routes defined.

Environment

Terraform version:

v1.5.7

Provider version:

v6.4.15

OS:

macOS 

Hello! Sorry for the late response, we had some days off for Easter.

Related to the first point from the issue, I will take a look, this shouldn't happen, the routes is marked as optional because it is optional indeed, so the creation without routes should work.

Related to the second point, this is a known issue, please read Known Issues section https://github.com/ionos-cloud/terraform-provider-ionoscloud/releases/tag/v6.4.15 where a workaround is presented.

Thank you!

@FLST-btelligent we released a new version: v6.4.16 that contains a fix for the first point that you presented. Thank you!