Skip to content

predefinedNetworkPrefix must be a string #69

Description

@itrich

Hi everyone,

we actually run into a rabbit hole using the VPN Gateway service. We need to set the predefinedNetworkPrefix via API. However, the API documentations is wrong, specifically

      "NetworkConfig": {
        "properties": {
          "predefinedNetworkPrefix": {
            "description": "The IPv4 network prefix (CIDR notation) allocated for the VPN gateway. Must have a prefix length of /28 or larger.\nOnce the gateway is created, is not possible to change this attribute.\n",
            "example": "10.0.0.0/28",
            "items": {
              "$ref": "#/components/schemas/IPv4CIDR"
            }
          },
          "routingTableId": {
            "description": "Custom routing table ID for the VPN gateway",
            "format": "uuid",
            "type": "string"
          }
        },
        "type": "object"
      },

The example in the API spec is correctly given as string, but the property itself is declared as array.

Image

If sending an array of IPv4 prefixes, the API returns error 400

{
	"error": {
		"code": 400,
		"message": "One or more fields are invalid.",
		"status": "BAD_REQUEST",
		"details": []
	}
}

Sending only a string (just as in the example) returns a success (and the VPN gateway gets created as expected).

Can you please fix the API specification? We need an update of the Terraform Go SDK so that we can manage the networkConfig via Terraform. The latter will be addressed in a separate PR by us.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions