-
Notifications
You must be signed in to change notification settings - Fork 24
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
Wrong setting for cloudapiv6 k8s-lans-dhcp after terraform apply. #25
Comments
Hello @dreamblack86 , The problem is actually with terraform's implementation of The marshaling/un-marshaling of the sdk structure behaves correctly because of the use of a pointer - We will fix the provider by working around |
Hi @mflorin , So you should maybe: // KubernetesNodePoolLan struct for KubernetesNodePoolLan
type KubernetesNodePoolLan struct {
// The LAN ID of an existing LAN at the related datacenter
Id *int32 `json:"id,omitempty"`
// Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
Dhcp *bool `json:"dhcp,omitempty"`
// array of additional LANs attached to worker nodes
Routes *[]KubernetesNodePoolLanRoutes `json:"routes,omitempty"`
} Replace with this. // KubernetesNodePoolLan struct for KubernetesNodePoolLan
type KubernetesNodePoolLan struct {
// The LAN ID of an existing LAN at the related datacenter
Id *int32 `json:"id,omitempty"`
// Indicates if the Kubernetes Node Pool LAN will reserve an IP using DHCP
DhcpDisable *bool `json:"dhcp_disable,omitempty"`
// array of additional LANs attached to worker nodes
Routes *[]KubernetesNodePoolLanRoutes `json:"routes,omitempty"`
} This ensures that if the customer leaves this field "empty", the correct default is set from IONOS's point of view. |
Or the IONOS Cloud really sets the value to |
Hi @mflorin Sorry about the wrong SDK reference. I just noticed that the pointers for booleans are used in a newer version of the SDK than my version. BTW that helps me then already in another place. =) |
@dreamblack86, please check v6.0.0-alpha.4 |
Description
We use the new feature of static routes for our Kubernetes clusters. This feature was added in the IONOS Cloud API v6. The problem now is that we urgently want to disable "dhcp". Do I set this directly in the Cloud API v6 via an HTTPS request. Is that also taken over correctly. However, the Terraform provider does not do this.
Expected behavior
The expected behavior would be that if I set dhcp = false in the "lans" property in the object in the K8s node pool, but the IONOS cloud maintains this value at "true". As a result, our "internal" network is not reachable.
Environment
Terraform version:
Provider version:
OS:
How to Reproduce
This can be easily reproduced by using the new Terraform Provider with v6 support and setting the resource
ionoscloud_k8s_node_pool
tofalse
for the LANs DHCP. After a Terraform apply this value will not be applied to the IONOS cloud.Error and Debug Output
Statefile:
Additional Notes
That issue on the ionos-cloud/sdk-go looks a lot like the cause to me:
ionos-cloud/sdk-go#5
The text was updated successfully, but these errors were encountered: