Kong / terraform-provider-konnect

16 stars 3 forks source link

incorrect cluster_type of gateway control plane #5

Closed liyangau closed 2 months ago

liyangau commented 2 months ago

Based on the spec _clustertype should be one of [ CLUSTER_TYPE_CONTROL_PLANE, CLUSTER_TYPE_K8S_INGRESS_CONTROLLER, CLUSTER_TYPE_CONTROL_PLANE_GROUP ].

The provider output below error when CLUSTER_TYPE_CONTROL_PLANE is used.

│ Error: Invalid Attribute Value Match
│
│   with konnect_gateway_control_plane.tf-test-cp,
│   on gateway-manager.tf line 17, in resource "konnect_gateway_control_plane" "tf-test-cp":
│   17:   cluster_type = "CLUSTER_TYPE_CONTROL_PLANE"
│
│ Attribute cluster_type value must be one of: ["\"CLUSTER_TYPE_HYBRID\"" "\"CLUSTER_TYPE_K8S_INGRESS_CONTROLLER\""
│ "\"CLUSTER_TYPE_CONTROL_PLANE_GROUP\""], got: "CLUSTER_TYPE_CONTROL_PLANE"

This could be related to https://github.com/Kong/terraform-provider-konnect/blob/main/internal/provider/gatewaycontrolplane_resource.go#L83-L89