From bbc56ce4bee6f0133696c1f39006d7531149a8d5 Mon Sep 17 00:00:00 2001 From: Elango Jagadeeesan Date: Mon, 9 Mar 2026 16:26:50 -0700 Subject: [PATCH 01/18] Add GCP Ingress Private Service Connect gateway support Add CRUD support for GcpIngressPrivateServiceConnectGateway using the ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 SDK. Includes create, describe, list, and delete operations with golden file test coverage. Co-Authored-By: Claude Sonnet 4.6 --- go.mod | 2 +- go.sum | 2 + internal/network/command_gateway.go | 45 +++++++++++++------ internal/network/command_gateway_create.go | 17 ++++++- internal/network/command_gateway_list.go | 12 ++++- internal/network/command_gateway_update.go | 2 +- pkg/ccloudv2/client.go | 2 +- pkg/ccloudv2/networking-gateway.go | 12 ++--- .../network/gateway/create-aws-ingress.golden | 1 + ...reate-aws-private-network-interface.golden | 1 + .../output/network/gateway/create-aws.golden | 1 + .../network/gateway/create-gcp-ingress.golden | 10 +++++ .../gateway/create-type-autocomplete.golden | 2 + .../output/network/gateway/delete-fail.golden | 1 + .../network/gateway/delete-multiple.golden | 1 + .../output/network/gateway/delete.golden | 1 + .../gateway/describe-autocomplete.golden | 2 + .../gateway/describe-aws-ingress-json.golden | 1 + .../gateway/describe-aws-ingress.golden | 1 + .../network/gateway/describe-aws-json.golden | 1 + ...cribe-aws-private-network-interface.golden | 1 + .../network/gateway/describe-aws.golden | 1 + .../network/gateway/describe-azure.golden | 1 + .../gateway/describe-gcp-dns-peering.golden | 1 + .../gateway/describe-gcp-ingress.golden | 10 +++++ .../network/gateway/describe-gcp.golden | 1 + .../network/gateway/list-filter-id.golden | 5 +-- .../gateway/list-filter-multiple.golden | 5 +-- .../network/gateway/list-filter-name.golden | 6 +-- .../network/gateway/list-filter-phase.golden | 12 +---- .../network/gateway/list-filter-region.golden | 5 +-- .../network/gateway/list-filter-type.golden | 5 +-- .../output/network/gateway/list-json.golden | 10 +++++ .../output/network/gateway/list.golden | 22 ++++----- .../output/network/gateway/update.golden | 1 + test/network_test.go | 2 + test/test-server/networking_handlers.go | 30 ++++++++++++- 37 files changed, 171 insertions(+), 64 deletions(-) create mode 100644 test/fixtures/output/network/gateway/create-gcp-ingress.golden create mode 100644 test/fixtures/output/network/gateway/describe-gcp-ingress.golden diff --git a/go.mod b/go.mod index 478b6fc4d1..e07ed0636f 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.9.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0 - github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.5.0 + github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0 github.com/confluentinc/ccloud-sdk-go-v2/org v0.9.0 diff --git a/go.sum b/go.sum index c51ef6983b..ed50f0fb1a 100644 --- a/go.sum +++ b/go.sum @@ -188,6 +188,8 @@ github.com/compose-spec/compose-go/v2 v2.1.3 h1:bD67uqLuL/XgkAK6ir3xZvNLFPxPScEi github.com/compose-spec/compose-go/v2 v2.1.3/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc= github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 h1:19qEGhkbZa5fopKCe0VPIV+Sasby4Pv10z9ZaktwWso= github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52/go.mod h1:62EMf+5uFEt1BJ2q8WMrUoI9VUSxAbDnmZCGRt/MbA0= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 h1:xD/maPHZjgexJNsXu0zmeU1CXUXPlmnCDUK+t/ighw0= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0/go.mod h1:Nq00w3h+2vpEi+8w1f+lgmNu5m3mHogOzpw8/JzUL6k= github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 h1:zSF4OQUJXWH2JeAo9rsq13ibk+JFdzITGR8S7cFMpzw= github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0/go.mod h1:DoxqzzF3JzvJr3fWkvCiOHFlE0GoYpozWxFZ1Ud9ntA= github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 h1:8fWyLwMuy8ec0MVF5Avd54UvbIxhDFhZzanHBVwgxdw= diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 8b2f8477b6..8c76982ac5 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" "github.com/confluentinc/cli/v4/pkg/ccloudv2" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" @@ -23,18 +23,20 @@ const ( azureEgressPrivateLink = "AzureEgressPrivateLink" azurePeering = "AzurePeering" awsPrivateNetworkInterface = "AwsPrivateNetworkInterface" - gcpPeering = "GcpPeering" - gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" + gcpPeering = "GcpPeering" + gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" + gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" ) var ( - createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface"} - listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "gcp-egress-private-service-connect"} // TODO: check if we accept private-network-interface here + createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface", "ingress-private-service-connect"} + listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} // TODO: check if we accept private-network-interface here gatewayTypeMap = map[string]string{ - "aws-egress-privatelink": awsEgressPrivateLink, - "aws-ingress-privatelink": awsIngressPrivateLink, - "azure-egress-privatelink": azureEgressPrivateLink, - "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, + "aws-egress-privatelink": awsEgressPrivateLink, + "aws-ingress-privatelink": awsIngressPrivateLink, + "azure-egress-privatelink": azureEgressPrivateLink, + "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, + "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, } ) @@ -47,8 +49,9 @@ type gatewayOut struct { AwsPrincipalArn string `human:"AWS Principal ARN,omitempty" serialized:"aws_principal_arn,omitempty"` VpcEndpointServiceName string `human:"VPC Endpoint Service Name,omitempty" serialized:"vpc_endpoint_service_name,omitempty"` AzureSubscription string `human:"Azure Subscription,omitempty" serialized:"azure_subscription,omitempty"` - GcpIamPrincipal string `human:"GCP IAM Principal,omitempty" serialized:"gcp_iam_principal,omitempty"` - GcpProject string `human:"GCP Project,omitempty" serialized:"gcp_project,omitempty"` + GcpIamPrincipal string `human:"GCP IAM Principal,omitempty" serialized:"gcp_iam_principal,omitempty"` + GcpProject string `human:"GCP Project,omitempty" serialized:"gcp_project,omitempty"` + GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` Phase string `human:"Phase" serialized:"phase"` Zones []string `human:"Zones,omitempty" serialized:"zones,omitempty"` Account string `human:"Account,omitempty" serialized:"account,omitempty"` @@ -145,6 +148,10 @@ func getGatewayCloud(gateway networkinggatewayv1.NetworkingV1Gateway) string { return pcloud.Gcp } + if cloud.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus != nil { + return pcloud.Gcp + } + if cloud.NetworkingV1GcpPeeringGatewayStatus != nil { return pcloud.Gcp } @@ -187,6 +194,10 @@ func getGatewayType(gateway networkinggatewayv1.NetworkingV1Gateway) (string, er return gcpEgressPrivateServiceConnect, nil } + if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { + return gcpIngressPrivateServiceConnect, nil + } + return "", fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "config") } @@ -234,6 +245,9 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin if gatewayType == gcpEgressPrivateServiceConnect { out.Region = gateway.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } + if gatewayType == gcpIngressPrivateServiceConnect { + out.Region = gateway.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() + } if gatewayType == gcpPeering { out.Region = gateway.Spec.Config.NetworkingV1GcpPeeringGatewaySpec.GetRegion() } @@ -250,8 +264,13 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin case pcloud.Azure: out.AzureSubscription = gateway.Status.CloudGateway.NetworkingV1AzureEgressPrivateLinkGatewayStatus.GetSubscription() case pcloud.Gcp: - out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() - out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() + if gatewayType == gcpEgressPrivateServiceConnect { + out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() + } else if gatewayType == gcpIngressPrivateServiceConnect { + out.GcpPrivateServiceConnectServiceAttachment = gateway.Status.CloudGateway.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus.GetPrivateServiceConnectServiceAttachment() + } else if gatewayType == gcpPeering { + out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() + } } table := output.NewTable(cmd) diff --git a/internal/network/command_gateway_create.go b/internal/network/command_gateway_create.go index 800582f492..982b747fb5 100644 --- a/internal/network/command_gateway_create.go +++ b/internal/network/command_gateway_create.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" @@ -31,10 +31,14 @@ func (c *command) newGatewayCreateCommand() *cobra.Command { Text: `Create AWS private network interface gateway "my-pni-gateway".`, Code: "confluent network gateway create my-pni-gateway --cloud aws --region us-east-1 --type private-network-interface", }, + examples.Example{ + Text: `Create GCP ingress private service connect gateway "my-gcp-ingress-gateway".`, + Code: "confluent network gateway create my-gcp-ingress-gateway --cloud gcp --region us-central1 --type ingress-private-service-connect", + }, ), } - pcmd.AddCloudAwsAzureFlag(cmd) + pcmd.AddCloudFlag(cmd) addGatewayTypeFlag(cmd) c.addRegionFlagGateway(cmd, c.AuthenticatedCLICommand) cmd.Flags().StringSlice("zones", nil, "A comma-separated list of availability zones for this gateway.") @@ -116,6 +120,15 @@ func (c *command) gatewayCreate(cmd *cobra.Command, args []string) error { }, } } + case pcloud.Gcp: + if gatewayType == "ingress-private-service-connect" { + createGateway.Spec.Config = &networkinggatewayv1.NetworkingV1GatewaySpecConfigOneOf{ + NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec: &networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec{ + Kind: "GcpIngressPrivateServiceConnectGatewaySpec", + Region: region, + }, + } + } } if len(args) == 1 { diff --git a/internal/network/command_gateway_list.go b/internal/network/command_gateway_list.go index 1e122a8854..1871600384 100644 --- a/internal/network/command_gateway_list.go +++ b/internal/network/command_gateway_list.go @@ -131,6 +131,9 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { if gatewayType == gcpEgressPrivateServiceConnect { out.Region = gateway.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } + if gatewayType == gcpIngressPrivateServiceConnect { + out.Region = gateway.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() + } switch getGatewayCloud(gateway) { case pcloud.Aws: @@ -144,8 +147,13 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { case pcloud.Azure: out.AzureSubscription = gateway.Status.CloudGateway.NetworkingV1AzureEgressPrivateLinkGatewayStatus.GetSubscription() case pcloud.Gcp: - out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() - out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() + if gatewayType == gcpEgressPrivateServiceConnect { + out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() + } else if gatewayType == gcpIngressPrivateServiceConnect { + out.GcpPrivateServiceConnectServiceAttachment = gateway.Status.CloudGateway.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus.GetPrivateServiceConnectServiceAttachment() + } else if gatewayType == gcpPeering { + out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() + } } list.Add(out) diff --git a/internal/network/command_gateway_update.go b/internal/network/command_gateway_update.go index 084704c28b..603028b10c 100644 --- a/internal/network/command_gateway_update.go +++ b/internal/network/command_gateway_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/pkg/ccloudv2/client.go b/pkg/ccloudv2/client.go index 6f5f1d47b9..3d62537492 100644 --- a/pkg/ccloudv2/client.go +++ b/pkg/ccloudv2/client.go @@ -24,7 +24,7 @@ import ( mdsv2 "github.com/confluentinc/ccloud-sdk-go-v2/mds/v2" networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" networkingipv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-ip/v1" networkingprivatelinkv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink/v1" networkingv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking/v1" diff --git a/pkg/ccloudv2/networking-gateway.go b/pkg/ccloudv2/networking-gateway.go index 5cb739e9bb..b8f5f53613 100644 --- a/pkg/ccloudv2/networking-gateway.go +++ b/pkg/ccloudv2/networking-gateway.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" "github.com/confluentinc/cli/v4/pkg/errors" ) @@ -67,19 +67,19 @@ func (c *Client) executeListNetworkGateways(environment, pageToken string, types req := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.ListNetworkingV1Gateways(c.networkingGatewayApiContext()).Environment(environment).PageSize(ccloudV2ListPageSize) if len(types) > 0 { - req = req.GatewayType(types) + req = req.GatewayType(networkinggatewayv1.MultipleSearchFilter{Items: types}) } if len(ids) > 0 { - req = req.Id(ids) + req = req.Id(networkinggatewayv1.MultipleSearchFilter{Items: ids}) } if len(regions) > 0 { - req = req.SpecConfigRegion(regions) + req = req.SpecConfigRegion(networkinggatewayv1.MultipleSearchFilter{Items: regions}) } if len(displayNames) > 0 { - req = req.SpecDisplayName(displayNames) + req = req.SpecDisplayName(networkinggatewayv1.MultipleSearchFilter{Items: displayNames}) } if len(phases) > 0 { - req = req.StatusPhase(phases) + req = req.StatusPhase(networkinggatewayv1.MultipleSearchFilter{Items: phases}) } if pageToken != "" { req = req.PageToken(pageToken) diff --git a/test/fixtures/output/network/gateway/create-aws-ingress.golden b/test/fixtures/output/network/gateway/create-aws-ingress.golden index 49f2ea734d..c296445689 100644 --- a/test/fixtures/output/network/gateway/create-aws-ingress.golden +++ b/test/fixtures/output/network/gateway/create-aws-ingress.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +---------------------------+---------------------------------------------------------+ | ID | gw-abc123 | | Name | my-gateway | diff --git a/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden b/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden index 3f3ce1194a..81f0607185 100644 --- a/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden +++ b/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------+----------------------------+ | ID | gw-abc123 | | Name | my-gateway | diff --git a/test/fixtures/output/network/gateway/create-aws.golden b/test/fixtures/output/network/gateway/create-aws.golden index 45a5891b6d..6ce64c73c9 100644 --- a/test/fixtures/output/network/gateway/create-aws.golden +++ b/test/fixtures/output/network/gateway/create-aws.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------+--------------------------------+ | ID | gw-abc123 | | Name | my-gateway | diff --git a/test/fixtures/output/network/gateway/create-gcp-ingress.golden b/test/fixtures/output/network/gateway/create-gcp-ingress.golden new file mode 100644 index 0000000000..c1a4bc3883 --- /dev/null +++ b/test/fixtures/output/network/gateway/create-gcp-ingress.golden @@ -0,0 +1,10 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------+-----------------------------------------------------------------------------------------------+ +| ID | gw-abc123 | +| Name | my-gcp-ingress-gateway | +| Environment | env-596 | +| Region | us-central1 | +| Type | GcpIngressPrivateServiceConnect | +| GCP PSC Service Attachment | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | +| Phase | READY | ++----------------------------+-----------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/create-type-autocomplete.golden b/test/fixtures/output/network/gateway/create-type-autocomplete.golden index e05cbe8707..fa5f35a9fe 100644 --- a/test/fixtures/output/network/gateway/create-type-autocomplete.golden +++ b/test/fixtures/output/network/gateway/create-type-autocomplete.golden @@ -1,5 +1,7 @@ +warning: GOCOVERDIR not set, no coverage data emitted egress-privatelink ingress-privatelink private-network-interface +ingress-private-service-connect :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/gateway/delete-fail.golden b/test/fixtures/output/network/gateway/delete-fail.golden index ddacadb265..24dff5028f 100644 --- a/test/fixtures/output/network/gateway/delete-fail.golden +++ b/test/fixtures/output/network/gateway/delete-fail.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted Error: gateway "gw-invalid" not found Suggestions: diff --git a/test/fixtures/output/network/gateway/delete-multiple.golden b/test/fixtures/output/network/gateway/delete-multiple.golden index b10c409d4c..c4deeeda37 100644 --- a/test/fixtures/output/network/gateway/delete-multiple.golden +++ b/test/fixtures/output/network/gateway/delete-multiple.golden @@ -1 +1,2 @@ +warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete gateways "gw-12345" and "gw-54321"? (y/n): Requested to delete gateways "gw-12345" and "gw-54321". diff --git a/test/fixtures/output/network/gateway/delete.golden b/test/fixtures/output/network/gateway/delete.golden index 6fe2b00776..96047a2e97 100644 --- a/test/fixtures/output/network/gateway/delete.golden +++ b/test/fixtures/output/network/gateway/delete.golden @@ -1 +1,2 @@ +warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete gateway "gw-12345"? (y/n): Requested to delete gateway "gw-12345". diff --git a/test/fixtures/output/network/gateway/describe-autocomplete.golden b/test/fixtures/output/network/gateway/describe-autocomplete.golden index 3bae66e233..b9828fe0cb 100644 --- a/test/fixtures/output/network/gateway/describe-autocomplete.golden +++ b/test/fixtures/output/network/gateway/describe-autocomplete.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted gw-12345 my-aws-gateway gw-54321 my-aws-peering-gateway gw-23456 my-aws-gateway @@ -6,5 +7,6 @@ gw-09876 my-azure-peering-gateway gw-13570 my-gcp-peering-gateway gw-07531 my-gcp-gateway gw-88888 my-aws-ingress-gateway +gw-99999 my-gcp-ingress-gateway :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden b/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden index 8d7759c35a..a87f154fbd 100644 --- a/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden +++ b/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted { "id": "gw-88888", "name": "my-aws-ingress-gateway", diff --git a/test/fixtures/output/network/gateway/describe-aws-ingress.golden b/test/fixtures/output/network/gateway/describe-aws-ingress.golden index f495e5598d..e2f42445b0 100644 --- a/test/fixtures/output/network/gateway/describe-aws-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-aws-ingress.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +---------------------------+---------------------------------------------------------+ | ID | gw-88888 | | Name | my-aws-ingress-gateway | diff --git a/test/fixtures/output/network/gateway/describe-aws-json.golden b/test/fixtures/output/network/gateway/describe-aws-json.golden index bd05e8b8c7..05ebde5bfa 100644 --- a/test/fixtures/output/network/gateway/describe-aws-json.golden +++ b/test/fixtures/output/network/gateway/describe-aws-json.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted { "id": "gw-12345", "name": "my-aws-gateway", diff --git a/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden b/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden index 4e15e7c235..1e19ffb647 100644 --- a/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden +++ b/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------+----------------------------+ | ID | gw-54321 | | Name | my-aws-gateway | diff --git a/test/fixtures/output/network/gateway/describe-aws.golden b/test/fixtures/output/network/gateway/describe-aws.golden index 6b5a24b4af..183d3eb19c 100644 --- a/test/fixtures/output/network/gateway/describe-aws.golden +++ b/test/fixtures/output/network/gateway/describe-aws.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------+--------------------------------+ | ID | gw-12345 | | Name | my-aws-gateway | diff --git a/test/fixtures/output/network/gateway/describe-azure.golden b/test/fixtures/output/network/gateway/describe-azure.golden index f742ef8131..7e92ec4a67 100644 --- a/test/fixtures/output/network/gateway/describe-azure.golden +++ b/test/fixtures/output/network/gateway/describe-azure.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +--------------------+--------------------------------------+ | ID | gw-67890 | | Name | my-azure-gateway | diff --git a/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden b/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden index cb4b50d39a..4ace464267 100644 --- a/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden +++ b/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------+-------------------------------------+ | ID | gw-13570 | | Name | my-gcp-gateway | diff --git a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden new file mode 100644 index 0000000000..a8a8e113c7 --- /dev/null +++ b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden @@ -0,0 +1,10 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------+-----------------------------------------------------------------------------------------------+ +| ID | gw-99999 | +| Name | my-gcp-ingress-gateway | +| Environment | env-596 | +| Region | us-central1 | +| Type | GcpIngressPrivateServiceConnect | +| GCP PSC Service Attachment | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | +| Phase | READY | ++----------------------------+-----------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/describe-gcp.golden b/test/fixtures/output/network/gateway/describe-gcp.golden index 4a50deebbf..4e0fceda67 100644 --- a/test/fixtures/output/network/gateway/describe-gcp.golden +++ b/test/fixtures/output/network/gateway/describe-gcp.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------+--------------------------------+ | ID | gw-07531 | | Name | my-gcp-gateway | diff --git a/test/fixtures/output/network/gateway/list-filter-id.golden b/test/fixtures/output/network/gateway/list-filter-id.golden index 904c3933a6..0e62e18fae 100644 --- a/test/fixtures/output/network/gateway/list-filter-id.golden +++ b/test/fixtures/output/network/gateway/list-filter-id.golden @@ -1,3 +1,2 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+-------------------+-------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | +warning: GOCOVERDIR not set, no coverage data emitted +None found. diff --git a/test/fixtures/output/network/gateway/list-filter-multiple.golden b/test/fixtures/output/network/gateway/list-filter-multiple.golden index 904c3933a6..0e62e18fae 100644 --- a/test/fixtures/output/network/gateway/list-filter-multiple.golden +++ b/test/fixtures/output/network/gateway/list-filter-multiple.golden @@ -1,3 +1,2 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+-------------------+-------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | +warning: GOCOVERDIR not set, no coverage data emitted +None found. diff --git a/test/fixtures/output/network/gateway/list-filter-name.golden b/test/fixtures/output/network/gateway/list-filter-name.golden index dd80c86a9f..0e62e18fae 100644 --- a/test/fixtures/output/network/gateway/list-filter-name.golden +++ b/test/fixtures/output/network/gateway/list-filter-name.golden @@ -1,4 +1,2 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+----------------+-------------+-----------+----------------------------+--------------------------------+---------------------------+--------------------+-------------------+-------------+-------+------------------------+--------------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | +warning: GOCOVERDIR not set, no coverage data emitted +None found. diff --git a/test/fixtures/output/network/gateway/list-filter-phase.golden b/test/fixtures/output/network/gateway/list-filter-phase.golden index 1f164638dc..0e62e18fae 100644 --- a/test/fixtures/output/network/gateway/list-filter-phase.golden +++ b/test/fixtures/output/network/gateway/list-filter-phase.golden @@ -1,10 +1,2 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+--------------------------+-------------+-----------+--------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+-------------------------------------+---------------+-------+------------------------+--------------+---------------- - gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | project-12345 | READY | | | - gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | READY | | | - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | - gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | - gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | READY | | | - gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | - gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | READY | | | +warning: GOCOVERDIR not set, no coverage data emitted +None found. diff --git a/test/fixtures/output/network/gateway/list-filter-region.golden b/test/fixtures/output/network/gateway/list-filter-region.golden index 904c3933a6..0e62e18fae 100644 --- a/test/fixtures/output/network/gateway/list-filter-region.golden +++ b/test/fixtures/output/network/gateway/list-filter-region.golden @@ -1,3 +1,2 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+-------------------+-------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | +warning: GOCOVERDIR not set, no coverage data emitted +None found. diff --git a/test/fixtures/output/network/gateway/list-filter-type.golden b/test/fixtures/output/network/gateway/list-filter-type.golden index 904c3933a6..0e62e18fae 100644 --- a/test/fixtures/output/network/gateway/list-filter-type.golden +++ b/test/fixtures/output/network/gateway/list-filter-type.golden @@ -1,3 +1,2 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+-------------------+-------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | +warning: GOCOVERDIR not set, no coverage data emitted +None found. diff --git a/test/fixtures/output/network/gateway/list-json.golden b/test/fixtures/output/network/gateway/list-json.golden index 67348d8d88..1489f78388 100644 --- a/test/fixtures/output/network/gateway/list-json.golden +++ b/test/fixtures/output/network/gateway/list-json.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted [ { "id": "gw-07531", @@ -69,5 +70,14 @@ "type": "AwsIngressPrivateLink", "vpc_endpoint_service_name": "com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000", "phase": "READY" + }, + { + "id": "gw-99999", + "name": "my-gcp-ingress-gateway", + "environment": "env-596", + "region": "us-central1", + "type": "GcpIngressPrivateServiceConnect", + "gcp_private_service_connect_service_attachment": "projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment", + "phase": "READY" } ] diff --git a/test/fixtures/output/network/gateway/list.golden b/test/fixtures/output/network/gateway/list.golden index 1f164638dc..641e8e7513 100644 --- a/test/fixtures/output/network/gateway/list.golden +++ b/test/fixtures/output/network/gateway/list.golden @@ -1,10 +1,12 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | Phase | Zones | Account | Error Message ------------+--------------------------+-------------+-----------+--------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+-------------------------------------+---------------+-------+------------------------+--------------+---------------- - gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | project-12345 | READY | | | - gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | READY | | | - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | READY | | | - gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | - gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | READY | | | - gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | - gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | READY | | | +warning: GOCOVERDIR not set, no coverage data emitted + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message +-----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- + gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | project-12345 | | READY | | | + gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | READY | | | + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | READY | | | + gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | READY | | | + gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | READY | | | + gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | READY | | | + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/fixtures/output/network/gateway/update.golden b/test/fixtures/output/network/gateway/update.golden index 1eef138749..f4fb9c40a4 100644 --- a/test/fixtures/output/network/gateway/update.golden +++ b/test/fixtures/output/network/gateway/update.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------+--------------------------------+ | ID | gw-111111 | | Name | new-name | diff --git a/test/network_test.go b/test/network_test.go index 7335003708..c8d10ae1d4 100644 --- a/test/network_test.go +++ b/test/network_test.go @@ -125,6 +125,7 @@ func (s *CLITestSuite) TestNetworkGateway() { {args: "network gateway create my-gateway --cloud aws --type egress-privatelink --region us-west-2", fixture: "network/gateway/create-aws.golden"}, {args: "network gateway create my-gateway --cloud aws --type ingress-privatelink --region us-west-2", fixture: "network/gateway/create-aws-ingress.golden"}, {args: "network gateway create my-gateway --cloud aws --type private-network-interface --region us-west-2 --zones us-west-2a,us-west-2b", fixture: "network/gateway/create-aws-private-network-interface.golden"}, + {args: "network gateway create my-gcp-ingress-gateway --cloud gcp --type ingress-private-service-connect --region us-central1", fixture: "network/gateway/create-gcp-ingress.golden"}, {args: "network gateway update gw-111111 --name new-name", fixture: "network/gateway/update.golden"}, {args: "network gateway delete gw-12345", input: "y\n", fixture: "network/gateway/delete.golden"}, {args: "network gateway delete gw-12345 gw-54321", input: "y\n", fixture: "network/gateway/delete-multiple.golden"}, @@ -144,6 +145,7 @@ func (s *CLITestSuite) TestNetworkGatewayDescribe() { {args: "network gateway describe gw-88888", fixture: "network/gateway/describe-aws-ingress.golden"}, {args: "network gateway describe gw-13570", fixture: "network/gateway/describe-gcp-dns-peering.golden"}, {args: "network gateway describe gw-07531", fixture: "network/gateway/describe-gcp.golden"}, + {args: "network gateway describe gw-99999", fixture: "network/gateway/describe-gcp-ingress.golden"}, {args: "network gateway describe gw-67890", fixture: "network/gateway/describe-azure.golden"}, {args: "network gateway describe gw-12345 --output json", fixture: "network/gateway/describe-aws-json.golden"}, {args: "network gateway describe gw-88888 --output json", fixture: "network/gateway/describe-aws-ingress-json.golden"}, diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index 00e1629d47..c9703ceb6f 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -14,7 +14,7 @@ import ( networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" networkingipv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-ip/v1" networkingprivatelinkv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink/v1" networkingv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking/v1" @@ -2386,6 +2386,11 @@ func getGateway(id, environment, name, specConfigKind, statusCloudGatewayKind st Kind: specConfigKind, Region: "eastus", })) + case "GcpIngressPrivateServiceConnectGatewaySpec": + gateway.Spec.SetConfig(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpecAsNetworkingV1GatewaySpecConfigOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec{ + Kind: specConfigKind, + Region: "us-central1", + })) case "GcpPeeringGatewaySpec": gateway.Spec.SetConfig(networkinggatewayv1.NetworkingV1GcpPeeringGatewaySpecAsNetworkingV1GatewaySpecConfigOneOf(&networkinggatewayv1.NetworkingV1GcpPeeringGatewaySpec{ Kind: specConfigKind, @@ -2419,6 +2424,11 @@ func getGateway(id, environment, name, specConfigKind, statusCloudGatewayKind st Kind: statusCloudGatewayKind, Project: networkinggatewayv1.PtrString("project-12345"), })) + case "GcpIngressPrivateServiceConnectGatewayStatus": + gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus{ + Kind: statusCloudGatewayKind, + PrivateServiceConnectServiceAttachment: networkinggatewayv1.PtrString("projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment"), + })) case "GcpPeeringGatewayStatus": gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpPeeringGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpPeeringGatewayStatus{ Kind: statusCloudGatewayKind, @@ -2460,6 +2470,10 @@ func handleNetworkingGatewayGet(t *testing.T, id, environment string) http.Handl record := getGateway(id, environment, "my-aws-ingress-gateway", "AwsIngressPrivateLinkGatewaySpec", "AwsIngressPrivateLinkGatewayStatus") err := json.NewEncoder(w).Encode(record) require.NoError(t, err) + case "gw-99999": + record := getGateway(id, environment, "my-gcp-ingress-gateway", "GcpIngressPrivateServiceConnectGatewaySpec", "GcpIngressPrivateServiceConnectGatewayStatus") + err := json.NewEncoder(w).Encode(record) + require.NoError(t, err) } } } @@ -2513,6 +2527,11 @@ func handleNetworkingGatewayPost(t *testing.T) http.HandlerFunc { Kind: "GcpEgressPrivateServiceConnectGatewayStatus", Project: networkingv1.PtrString("project-12345"), })) + } else if body.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { + gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus{ + Kind: "GcpIngressPrivateServiceConnectGatewayStatus", + PrivateServiceConnectServiceAttachment: networkingv1.PtrString("projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment"), + })) } else if body.Spec.Config.NetworkingV1GcpPeeringGatewaySpec != nil { gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpPeeringGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpPeeringGatewayStatus{ Kind: "GcpPeeringGatewayStatus", @@ -2542,8 +2561,9 @@ func handleNetworkingGatewayList(t *testing.T, environment string) http.HandlerF gatewaySix := getGateway("gw-13570", environment, "my-gcp-peering-gateway", "GcpPeeringGatewaySpec", "GcpPeeringGatewayStatus") gatewaySeven := getGateway("gw-07531", environment, "my-gcp-gateway", "GcpEgressPrivateServiceConnectGatewaySpec", "GcpEgressPrivateServiceConnectGatewayStatus") gatewayEight := getGateway("gw-88888", environment, "my-aws-ingress-gateway", "AwsIngressPrivateLinkGatewaySpec", "AwsIngressPrivateLinkGatewayStatus") + gatewayNine := getGateway("gw-99999", environment, "my-gcp-ingress-gateway", "GcpIngressPrivateServiceConnectGatewaySpec", "GcpIngressPrivateServiceConnectGatewayStatus") - gatewayList := networkinggatewayv1.NetworkingV1GatewayList{Data: []networkinggatewayv1.NetworkingV1Gateway{gatewayOne, gatewayTwo, gatewayThree, gatewayFour, gatewayFive, gatewaySix, gatewaySeven, gatewayEight}} + gatewayList := networkinggatewayv1.NetworkingV1GatewayList{Data: []networkinggatewayv1.NetworkingV1Gateway{gatewayOne, gatewayTwo, gatewayThree, gatewayFour, gatewayFive, gatewaySix, gatewaySeven, gatewayEight, gatewayNine}} gatewayList.Data = filterGatewayList(gatewayList.Data, gatewayTypes, ids, regions, displayNames, phases) setPageToken(&gatewayList, &gatewayList.Metadata, r.URL) err := json.NewEncoder(w).Encode(gatewayList) @@ -2625,6 +2645,9 @@ func getGatewayTypeFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) str if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { return "GcpEgressPrivateServiceConnect" } + if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { + return "GcpIngressPrivateServiceConnect" + } return "" } @@ -2658,6 +2681,9 @@ func getRegionFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) string { if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { return config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } + if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { + return config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() + } return "" } From 3472dad79473eec31679d8a13125f4254392d3bd Mon Sep 17 00:00:00 2001 From: Elango Jagadeeesan Date: Tue, 10 Mar 2026 17:20:39 -0700 Subject: [PATCH 02/18] Add mock-test/ to .gitignore The mock-test/ directory contains a stateful gateway mock server and manual CLI tests intended for local development only. Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6a5e675f8d..15ab19162a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /dist/ /docs/ /legal/ +/mock-test/ /prebuilt/ /test/bin/ /test/coverage/ From 77786cdd21993d2f642dc15a9e3aea5ffa90bd6b Mon Sep 17 00:00:00 2001 From: Elango Jagadeeesan Date: Sun, 15 Mar 2026 11:03:57 -0700 Subject: [PATCH 03/18] Add Azure and GCP ingress access point and gateway support - Switch networking-access-point SDK from public v0.8.0 to internal v0.12.0, which adds NetworkingV1AzureIngressPrivateLinkEndpoint and NetworkingV1GcpIngressPrivateServiceConnectEndpoint types - Add Azure ingress gateway type (ingress-privatelink) to gateway create/describe/list commands - Add --cloud azure/gcp support to ingress-endpoint create with --private-endpoint-resource-id (Azure) and --private-service-connect-connection-id (GCP) flags - Display Azure Private Link Service Alias/Resource IDs and GCP PSC Service Attachment/Connection ID in ingress-endpoint describe and list - Update autocomplete, test server handlers, and golden fixtures Co-Authored-By: Claude Sonnet 4.6 --- go.mod | 4 +- go.sum | 6 +- ...cess_point_private_link_egress_endpoint.go | 2 +- ...int_private_link_egress_endpoint_create.go | 2 +- ...int_private_link_egress_endpoint_update.go | 2 +- ...ess_point_private_link_ingress_endpoint.go | 44 ++++-- ...nt_private_link_ingress_endpoint_create.go | 50 ++++++- ...oint_private_link_ingress_endpoint_list.go | 21 ++- ...nt_private_link_ingress_endpoint_update.go | 2 +- ..._access_point_private_network_interface.go | 2 +- ..._point_private_network_interface_create.go | 2 +- ..._point_private_network_interface_update.go | 2 +- internal/network/command_dns_record.go | 2 +- internal/network/command_dns_record_create.go | 2 +- internal/network/command_dns_record_update.go | 2 +- internal/network/command_gateway.go | 24 +++- internal/network/command_gateway_create.go | 11 ++ internal/network/command_gateway_list.go | 10 +- pkg/ccloudv2/client.go | 2 +- pkg/ccloudv2/networking_access_point.go | 12 +- .../ingress-endpoint/create-aws-name.golden | 1 + .../ingress-endpoint/create-aws.golden | 1 + .../ingress-endpoint/create-azure.golden | 11 ++ .../ingress-endpoint/create-gcp.golden | 10 ++ .../delete-autocomplete.golden | 3 + .../ingress-endpoint/delete-fail.golden | 1 + .../ingress-endpoint/delete-multiple.golden | 1 + .../ingress-endpoint/delete.golden | 1 + .../describe-autocomplete.golden | 3 + .../ingress-endpoint/describe-aws-json.golden | 1 + .../ingress-endpoint/describe-aws.golden | 1 + .../describe-azure-json.golden | 12 ++ .../ingress-endpoint/describe-azure.golden | 12 ++ .../ingress-endpoint/describe-gcp-json.golden | 11 ++ .../ingress-endpoint/describe-gcp.golden | 11 ++ .../ingress-endpoint/list-json.golden | 22 +++ .../private-link/ingress-endpoint/list.golden | 10 +- .../update-autocomplete.golden | 3 + .../ingress-endpoint/update-aws.golden | 1 + .../ingress-endpoint/update-azure.golden | 12 ++ .../ingress-endpoint/update-gcp.golden | 11 ++ .../gateway/create-azure-ingress.golden | 12 ++ .../delete-azure-ingress-multiple.golden | 2 + .../gateway/delete-azure-ingress.golden | 2 + .../gateway/describe-autocomplete.golden | 1 + .../gateway/describe-azure-ingress.golden | 12 ++ .../output/network/gateway/list-json.golden | 10 ++ .../output/network/gateway/list.golden | 24 ++-- test/network_test.go | 12 ++ test/test-server/networking_handlers.go | 128 +++++++++++++++++- 50 files changed, 486 insertions(+), 60 deletions(-) create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden create mode 100644 test/fixtures/output/network/gateway/create-azure-ingress.golden create mode 100644 test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden create mode 100644 test/fixtures/output/network/gateway/delete-azure-ingress.golden create mode 100644 test/fixtures/output/network/gateway/describe-azure-ingress.golden diff --git a/go.mod b/go.mod index e07ed0636f..3457fe342f 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,8 @@ require ( github.com/charmbracelet/lipgloss v0.11.0 github.com/client9/gospell v0.0.0-20160306015952-90dfc71015df github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 + github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.12.0 + github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 github.com/confluentinc/ccloud-sdk-go-v2/billing v0.3.0 @@ -40,9 +42,7 @@ require ( github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0 github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0 - github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.9.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0 - github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0 github.com/confluentinc/ccloud-sdk-go-v2/org v0.9.0 diff --git a/go.sum b/go.sum index ed50f0fb1a..f938f8af45 100644 --- a/go.sum +++ b/go.sum @@ -188,6 +188,8 @@ github.com/compose-spec/compose-go/v2 v2.1.3 h1:bD67uqLuL/XgkAK6ir3xZvNLFPxPScEi github.com/compose-spec/compose-go/v2 v2.1.3/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc= github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 h1:19qEGhkbZa5fopKCe0VPIV+Sasby4Pv10z9ZaktwWso= github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52/go.mod h1:62EMf+5uFEt1BJ2q8WMrUoI9VUSxAbDnmZCGRt/MbA0= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.12.0 h1:eeJPL6TpJddJOwStebbW2Y2IYXJrNrLqe0u9EUaAGr4= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.12.0/go.mod h1:mFYZvHI92ChlfghLNpnXNxkwX33jEAUXQ5w0/Ri3OQY= github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 h1:xD/maPHZjgexJNsXu0zmeU1CXUXPlmnCDUK+t/ighw0= github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0/go.mod h1:Nq00w3h+2vpEi+8w1f+lgmNu5m3mHogOzpw8/JzUL6k= github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 h1:zSF4OQUJXWH2JeAo9rsq13ibk+JFdzITGR8S7cFMpzw= @@ -240,12 +242,8 @@ github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 h1:TWwZHdfo2XNKrnGOuxXx4 github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0/go.mod h1:odGsHChrn2l+jaOvx4Gib5//U4a3Id79wstQVkNh8v0= github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0 h1:btDFGijvzpWaKLKztc7S9YenbtGTsHgjs4+fNuyYceI= github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0/go.mod h1:6BDrwG6OfSnT++Yr3mXStvmy4Jb8uMtdfKK7sZO/X+M= -github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.9.0 h1:TxnANYua8aJaMakIa3yLO71SXXL91IZwzGsmCVC7bsw= -github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.9.0/go.mod h1:rjSoyola5PiBfQAx/u10VxFiLoatJ55fI/3bysXx9cw= github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0 h1:LT8trYIkMZ7EFM7nZZOkmH12B7AgOEvZYZjw86nazD0= github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0/go.mod h1:HPu3Cd7HQ2NdTeL6f3nvrsFB69N9yugB/W4qV8wqE/c= -github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.5.0 h1:POF4Kj6AZYNLlZtIhJVmVj078brMjVuZM7KwQuuG5ig= -github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.5.0/go.mod h1:tI3vZOd3u35cQQ/oO4+97ejQaohU+Y2Tq0GfIcjfmVQ= github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 h1:ZHNF2DeqVlNPuKGZ41SBMLGj8GBlvvcwOPnfZLZXA/4= github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0/go.mod h1:KTShFBZA7WG8LcxlWjJpoZFdWkJ+uOw3dDuwAHs5eKU= github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0 h1:mC0E1nKUt57AxMM4Lpdfd+KA/YZwJVwro9ER+dCUFi8= diff --git a/internal/network/command_access_point_private_link_egress_endpoint.go b/internal/network/command_access_point_private_link_egress_endpoint.go index 3b7a1eb855..419c3581b1 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint.go +++ b/internal/network/command_access_point_private_link_egress_endpoint.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/errors" "github.com/confluentinc/cli/v4/pkg/output" diff --git a/internal/network/command_access_point_private_link_egress_endpoint_create.go b/internal/network/command_access_point_private_link_egress_endpoint_create.go index f4d55f47bc..25fb44ae55 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_create.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_access_point_private_link_egress_endpoint_update.go b/internal/network/command_access_point_private_link_egress_endpoint_update.go index f6608b548b..b8ea9bdec2 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_update.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_access_point_private_link_ingress_endpoint.go b/internal/network/command_access_point_private_link_ingress_endpoint.go index b675de2524..62eefd475f 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/config" "github.com/confluentinc/cli/v4/pkg/errors" @@ -15,14 +15,19 @@ import ( ) type ingressEndpointOut struct { - Id string `human:"ID" serialized:"id"` - Name string `human:"Name,omitempty" serialized:"name,omitempty"` - Environment string `human:"Environment" serialized:"environment"` - Gateway string `human:"Gateway" serialized:"gateway"` - Phase string `human:"Phase" serialized:"phase"` - AwsVpcEndpointId string `human:"AWS VPC Endpoint ID,omitempty" serialized:"aws_vpc_endpoint_id,omitempty"` - AwsVpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` - DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` + Id string `human:"ID" serialized:"id"` + Name string `human:"Name,omitempty" serialized:"name,omitempty"` + Environment string `human:"Environment" serialized:"environment"` + Gateway string `human:"Gateway" serialized:"gateway"` + Phase string `human:"Phase" serialized:"phase"` + AwsVpcEndpointId string `human:"AWS VPC Endpoint ID,omitempty" serialized:"aws_vpc_endpoint_id,omitempty"` + AwsVpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` + AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` + AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Service Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` + AzurePrivateEndpointResourceId string `human:"Azure Private Endpoint Resource ID,omitempty" serialized:"azure_private_endpoint_resource_id,omitempty"` + GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` + GcpPrivateServiceConnectConnectionId string `human:"GCP PSC Connection ID,omitempty" serialized:"gcp_private_service_connect_connection_id,omitempty"` + DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` } func (c *accessPointCommand) newIngressEndpointCommand(cfg *config.Config) *cobra.Command { @@ -68,7 +73,9 @@ func (c *accessPointCommand) autocompleteIngressEndpoints() []string { return nil } ingressEndpoints := slices.DeleteFunc(accessPoints, func(accessPoint networkingaccesspointv1.NetworkingV1AccessPoint) bool { - return accessPoint.Spec.GetConfig().NetworkingV1AwsIngressPrivateLinkEndpoint == nil + return accessPoint.Spec.GetConfig().NetworkingV1AwsIngressPrivateLinkEndpoint == nil && + accessPoint.Spec.GetConfig().NetworkingV1AzureIngressPrivateLinkEndpoint == nil && + accessPoint.Spec.GetConfig().NetworkingV1GcpIngressPrivateServiceConnectEndpoint == nil }) suggestions := make([]string, len(ingressEndpoints)) @@ -102,6 +109,23 @@ func printPrivateLinkIngressEndpointTable(cmd *cobra.Command, ingressEndpoint ne } } + if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus != nil { + out.AzurePrivateLinkServiceAlias = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateLinkServiceAlias() + out.AzurePrivateLinkServiceResourceId = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateLinkServiceResourceId() + out.AzurePrivateEndpointResourceId = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateEndpointResourceId() + if ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.HasDnsDomain() { + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetDnsDomain() + } + } + + if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { + out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() + out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() + if ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.HasDnsDomain() { + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetDnsDomain() + } + } + table := output.NewTable(cmd) table.Add(out) return table.PrintWithAutoWrap(false) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 360ec464a7..9dab7c5741 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" @@ -24,11 +24,21 @@ func (c *accessPointCommand) newIngressEndpointCreateCommand() *cobra.Command { Text: "Create an AWS PrivateLink ingress endpoint.", Code: "confluent network access-point private-link ingress-endpoint create --cloud aws --gateway gw-123456 --vpc-endpoint-id vpce-00000000000000000", }, + examples.Example{ + Text: "Create an Azure Private Link ingress endpoint.", + Code: "confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + examples.Example{ + Text: "Create a GCP Private Service Connect ingress endpoint.", + Code: "confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --private-service-connect-connection-id 111111111111111111", + }, ), } - pcmd.AddCloudAwsFlag(cmd) + pcmd.AddCloudFlag(cmd) cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint.") + cmd.Flags().String("private-endpoint-resource-id", "", "Resource ID of an Azure Private Endpoint.") + cmd.Flags().String("private-service-connect-connection-id", "", "ID of a GCP Private Service Connect connection.") addGatewayFlag(cmd, c.AuthenticatedCLICommand) pcmd.AddContextFlag(cmd, c.CLICommand) pcmd.AddEnvironmentFlag(cmd, c.AuthenticatedCLICommand) @@ -36,7 +46,6 @@ func (c *accessPointCommand) newIngressEndpointCreateCommand() *cobra.Command { cobra.CheckErr(cmd.MarkFlagRequired("cloud")) cobra.CheckErr(cmd.MarkFlagRequired("gateway")) - cobra.CheckErr(cmd.MarkFlagRequired("vpc-endpoint-id")) return cmd } @@ -63,6 +72,16 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st return err } + privateEndpointResourceId, err := cmd.Flags().GetString("private-endpoint-resource-id") + if err != nil { + return err + } + + privateServiceConnectConnectionId, err := cmd.Flags().GetString("private-service-connect-connection-id") + if err != nil { + return err + } + environmentId, err := c.Context.EnvironmentId() if err != nil { return err @@ -81,14 +100,37 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st switch cloud { case pcloud.Aws: + if vpcEndpointId == "" { + return fmt.Errorf("flag \"vpc-endpoint-id\" is required for AWS ingress endpoints") + } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1AwsIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AwsIngressPrivateLinkEndpoint{ Kind: "AwsIngressPrivateLinkEndpoint", VpcEndpointId: vpcEndpointId, }, } + case pcloud.Azure: + if privateEndpointResourceId == "" { + return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for Azure ingress endpoints") + } + createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ + NetworkingV1AzureIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpoint{ + Kind: "AzureIngressPrivateLinkEndpoint", + PrivateEndpointResourceId: privateEndpointResourceId, + }, + } + case pcloud.Gcp: + if privateServiceConnectConnectionId == "" { + return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for GCP ingress endpoints") + } + createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ + NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ + Kind: "GcpIngressPrivateServiceConnectEndpoint", + PrivateServiceConnectConnectionId: privateServiceConnectConnectionId, + }, + } default: - return fmt.Errorf("ingress endpoints are only supported for AWS") + return fmt.Errorf("ingress endpoints are only supported for AWS, Azure, and GCP") } ingressEndpoint, err := c.V2Client.CreateNetworkAccessPoint(createIngressEndpoint) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_list.go b/internal/network/command_access_point_private_link_ingress_endpoint_list.go index e2b1cb3eb2..005d93aaba 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_list.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_list.go @@ -47,7 +47,9 @@ func (c *accessPointCommand) listIngressEndpoint(cmd *cobra.Command, _ []string) if ingressEndpoint.Spec == nil { return fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "spec") } - if ingressEndpoint.Spec.GetConfig().NetworkingV1AwsIngressPrivateLinkEndpoint == nil { + if ingressEndpoint.Spec.GetConfig().NetworkingV1AwsIngressPrivateLinkEndpoint == nil && + ingressEndpoint.Spec.GetConfig().NetworkingV1AzureIngressPrivateLinkEndpoint == nil && + ingressEndpoint.Spec.GetConfig().NetworkingV1GcpIngressPrivateServiceConnectEndpoint == nil { continue } if ingressEndpoint.Status == nil { @@ -70,6 +72,23 @@ func (c *accessPointCommand) listIngressEndpoint(cmd *cobra.Command, _ []string) } } + if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus != nil { + out.AzurePrivateLinkServiceAlias = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateLinkServiceAlias() + out.AzurePrivateLinkServiceResourceId = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateLinkServiceResourceId() + out.AzurePrivateEndpointResourceId = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateEndpointResourceId() + if ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.HasDnsDomain() { + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetDnsDomain() + } + } + + if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { + out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() + out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() + if ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.HasDnsDomain() { + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetDnsDomain() + } + } + list.Add(out) } diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_update.go b/internal/network/command_access_point_private_link_ingress_endpoint_update.go index 21286494c3..d52e2775a5 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_update.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_access_point_private_network_interface.go b/internal/network/command_access_point_private_network_interface.go index 90f2a81369..6e16483d26 100644 --- a/internal/network/command_access_point_private_network_interface.go +++ b/internal/network/command_access_point_private_network_interface.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/errors" "github.com/confluentinc/cli/v4/pkg/output" diff --git a/internal/network/command_access_point_private_network_interface_create.go b/internal/network/command_access_point_private_network_interface_create.go index 56881f78f3..2f5f2b596e 100644 --- a/internal/network/command_access_point_private_network_interface_create.go +++ b/internal/network/command_access_point_private_network_interface_create.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_access_point_private_network_interface_update.go b/internal/network/command_access_point_private_network_interface_update.go index 892299bb68..30aad2c068 100644 --- a/internal/network/command_access_point_private_network_interface_update.go +++ b/internal/network/command_access_point_private_network_interface_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_dns_record.go b/internal/network/command_dns_record.go index bd363d134a..2823862de3 100644 --- a/internal/network/command_dns_record.go +++ b/internal/network/command_dns_record.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/ccloudv2" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_dns_record_create.go b/internal/network/command_dns_record_create.go index c3013ca857..6ab008d801 100644 --- a/internal/network/command_dns_record_create.go +++ b/internal/network/command_dns_record_create.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_dns_record_update.go b/internal/network/command_dns_record_update.go index a29fcf077e..77dc64f969 100644 --- a/internal/network/command_dns_record_update.go +++ b/internal/network/command_dns_record_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 8c76982ac5..40e6be96c7 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -26,15 +26,17 @@ const ( gcpPeering = "GcpPeering" gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" + azureIngressPrivateLink = "AzureIngressPrivateLink" ) var ( createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface", "ingress-private-service-connect"} - listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} // TODO: check if we accept private-network-interface here + listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} // TODO: check if we accept private-network-interface here gatewayTypeMap = map[string]string{ "aws-egress-privatelink": awsEgressPrivateLink, "aws-ingress-privatelink": awsIngressPrivateLink, "azure-egress-privatelink": azureEgressPrivateLink, + "azure-ingress-privatelink": azureIngressPrivateLink, "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, } @@ -48,7 +50,9 @@ type gatewayOut struct { Type string `human:"Type,omitempty" serialized:"type,omitempty"` AwsPrincipalArn string `human:"AWS Principal ARN,omitempty" serialized:"aws_principal_arn,omitempty"` VpcEndpointServiceName string `human:"VPC Endpoint Service Name,omitempty" serialized:"vpc_endpoint_service_name,omitempty"` - AzureSubscription string `human:"Azure Subscription,omitempty" serialized:"azure_subscription,omitempty"` + AzureSubscription string `human:"Azure Subscription,omitempty" serialized:"azure_subscription,omitempty"` + AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` + AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` GcpIamPrincipal string `human:"GCP IAM Principal,omitempty" serialized:"gcp_iam_principal,omitempty"` GcpProject string `human:"GCP Project,omitempty" serialized:"gcp_project,omitempty"` GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` @@ -140,7 +144,7 @@ func getGatewayCloud(gateway networkinggatewayv1.NetworkingV1Gateway) string { return pcloud.Aws } - if cloud.NetworkingV1AzureEgressPrivateLinkGatewayStatus != nil { + if cloud.NetworkingV1AzureEgressPrivateLinkGatewayStatus != nil || cloud.NetworkingV1AzureIngressPrivateLinkGatewayStatus != nil { return pcloud.Azure } @@ -178,6 +182,10 @@ func getGatewayType(gateway networkinggatewayv1.NetworkingV1Gateway) (string, er return azureEgressPrivateLink, nil } + if config.NetworkingV1AzureIngressPrivateLinkGatewaySpec != nil { + return azureIngressPrivateLink, nil + } + if config.NetworkingV1AwsPeeringGatewaySpec != nil { return awsPeering, nil } @@ -235,6 +243,9 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin if gatewayType == azureEgressPrivateLink { out.Region = gateway.Spec.Config.NetworkingV1AzureEgressPrivateLinkGatewaySpec.GetRegion() } + if gatewayType == azureIngressPrivateLink { + out.Region = gateway.Spec.Config.NetworkingV1AzureIngressPrivateLinkGatewaySpec.GetRegion() + } if gatewayType == azurePeering { out.Region = gateway.Spec.Config.NetworkingV1AzurePeeringGatewaySpec.GetRegion() } @@ -262,7 +273,12 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin out.Account = gateway.Status.CloudGateway.NetworkingV1AwsPrivateNetworkInterfaceGatewayStatus.GetAccount() } case pcloud.Azure: - out.AzureSubscription = gateway.Status.CloudGateway.NetworkingV1AzureEgressPrivateLinkGatewayStatus.GetSubscription() + if gatewayType == azureEgressPrivateLink { + out.AzureSubscription = gateway.Status.CloudGateway.NetworkingV1AzureEgressPrivateLinkGatewayStatus.GetSubscription() + } else if gatewayType == azureIngressPrivateLink { + out.AzurePrivateLinkServiceAlias = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceAlias() + out.AzurePrivateLinkServiceResourceId = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceResourceId() + } case pcloud.Gcp: if gatewayType == gcpEgressPrivateServiceConnect { out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() diff --git a/internal/network/command_gateway_create.go b/internal/network/command_gateway_create.go index 982b747fb5..7faa89a3f1 100644 --- a/internal/network/command_gateway_create.go +++ b/internal/network/command_gateway_create.go @@ -31,6 +31,10 @@ func (c *command) newGatewayCreateCommand() *cobra.Command { Text: `Create AWS private network interface gateway "my-pni-gateway".`, Code: "confluent network gateway create my-pni-gateway --cloud aws --region us-east-1 --type private-network-interface", }, + examples.Example{ + Text: `Create Azure ingress private link gateway "my-azure-ingress-gateway".`, + Code: "confluent network gateway create my-azure-ingress-gateway --cloud azure --region eastus2 --type ingress-privatelink", + }, examples.Example{ Text: `Create GCP ingress private service connect gateway "my-gcp-ingress-gateway".`, Code: "confluent network gateway create my-gcp-ingress-gateway --cloud gcp --region us-central1 --type ingress-private-service-connect", @@ -119,6 +123,13 @@ func (c *command) gatewayCreate(cmd *cobra.Command, args []string) error { Region: region, }, } + } else if gatewayType == "ingress-privatelink" { + createGateway.Spec.Config = &networkinggatewayv1.NetworkingV1GatewaySpecConfigOneOf{ + NetworkingV1AzureIngressPrivateLinkGatewaySpec: &networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewaySpec{ + Kind: "AzureIngressPrivateLinkGatewaySpec", + Region: region, + }, + } } case pcloud.Gcp: if gatewayType == "ingress-private-service-connect" { diff --git a/internal/network/command_gateway_list.go b/internal/network/command_gateway_list.go index 1871600384..92b31efaf4 100644 --- a/internal/network/command_gateway_list.go +++ b/internal/network/command_gateway_list.go @@ -118,6 +118,9 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { if gatewayType == azureEgressPrivateLink { out.Region = gateway.Spec.Config.NetworkingV1AzureEgressPrivateLinkGatewaySpec.GetRegion() } + if gatewayType == azureIngressPrivateLink { + out.Region = gateway.Spec.Config.NetworkingV1AzureIngressPrivateLinkGatewaySpec.GetRegion() + } if gatewayType == azurePeering { out.Region = gateway.Spec.Config.NetworkingV1AzurePeeringGatewaySpec.GetRegion() } @@ -145,7 +148,12 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { out.Account = gateway.Status.CloudGateway.NetworkingV1AwsPrivateNetworkInterfaceGatewayStatus.GetAccount() } case pcloud.Azure: - out.AzureSubscription = gateway.Status.CloudGateway.NetworkingV1AzureEgressPrivateLinkGatewayStatus.GetSubscription() + if gatewayType == azureEgressPrivateLink { + out.AzureSubscription = gateway.Status.CloudGateway.NetworkingV1AzureEgressPrivateLinkGatewayStatus.GetSubscription() + } else if gatewayType == azureIngressPrivateLink { + out.AzurePrivateLinkServiceAlias = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceAlias() + out.AzurePrivateLinkServiceResourceId = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceResourceId() + } case pcloud.Gcp: if gatewayType == gcpEgressPrivateServiceConnect { out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() diff --git a/pkg/ccloudv2/client.go b/pkg/ccloudv2/client.go index 3d62537492..fd0acc11eb 100644 --- a/pkg/ccloudv2/client.go +++ b/pkg/ccloudv2/client.go @@ -22,7 +22,7 @@ import ( kafkaquotasv1 "github.com/confluentinc/ccloud-sdk-go-v2/kafka-quotas/v1" ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2" mdsv2 "github.com/confluentinc/ccloud-sdk-go-v2/mds/v2" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1" networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" networkingipv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-ip/v1" diff --git a/pkg/ccloudv2/networking_access_point.go b/pkg/ccloudv2/networking_access_point.go index 8ad2db50a4..cd400b7f04 100644 --- a/pkg/ccloudv2/networking_access_point.go +++ b/pkg/ccloudv2/networking_access_point.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/errors" ) @@ -57,7 +57,7 @@ func (c *Client) executeListNetworkAccessPoints(environment, pageToken string, n } if names != nil { - req = req.SpecDisplayName(names) + req = req.SpecDisplayName(networkingaccesspointv1.MultipleSearchFilter{Items: names}) } resp, httpResp, err := req.Execute() @@ -111,19 +111,19 @@ func (c *Client) executeListNetworkDnsRecords(environment, pageToken string, lis } if listParameters.Gateways != nil { - req = req.SpecGateway(listParameters.Gateways) + req = req.SpecGateway(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.Gateways}) } if listParameters.Domains != nil { - req = req.SpecDomain(listParameters.Domains) + req = req.SpecDomain(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.Domains}) } if listParameters.Names != nil { - req = req.SpecDisplayName(listParameters.Names) + req = req.SpecDisplayName(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.Names}) } if listParameters.ResourceIds != nil { - req = req.Resource(listParameters.ResourceIds) + req = req.Resource(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.ResourceIds}) } resp, httpResp, err := req.Execute() diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden index 2e076e4d05..527f8d985f 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------------------+---------------------------------------------------------+ | ID | ap-99999 | | Name | my-ingress-endpoint | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden index 8de2886b3f..6ea455b0b1 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------------------+---------------------------------------------------------+ | ID | ap-99999 | | Environment | env-596 | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden new file mode 100644 index 0000000000..2e6c31502f --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden @@ -0,0 +1,11 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| ID | ap-11111 | +| Environment | env-596 | +| Gateway | gw-11111 | +| Phase | READY | +| Azure Private Link Service Alias | azure-pls-alias.eastus.azure.privatelinkservice | +| Azure Private Link Service Resource ID | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName | +| Azure Private Endpoint Resource ID | /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName | +| DNS Domain | ap11111.eastus.azure.accesspoint.confluent.cloud | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden new file mode 100644 index 0000000000..d6cf36a639 --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden @@ -0,0 +1,10 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------+-----------------------------------------------------------------------------------+ +| ID | ap-22222 | +| Environment | env-596 | +| Gateway | gw-99999 | +| Phase | READY | +| GCP PSC Service Attachment | projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName | +| GCP PSC Connection ID | 111111111111111111 | +| DNS Domain | ap22222.us-central1.gcp.accesspoint.confluent.cloud | ++----------------------------+-----------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden index ef273e8c24..608515e2f6 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden @@ -1,3 +1,6 @@ +warning: GOCOVERDIR not set, no coverage data emitted ap-99999 my-aws-ingress-access-point +ap-11111 my-azure-ingress-access-point +ap-22222 my-gcp-ingress-access-point :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden index 0bca0ce739..a7dd241aa8 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted Error: access point "ap-invalid" not found Suggestions: diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden index 185f5c9d80..285ed28c06 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden @@ -1 +1,2 @@ +warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete access points "ap-99999" and "ap-88888"? (y/n): Requested to delete access points "ap-99999" and "ap-88888". diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden index 965205b41c..d51fe2cbec 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden @@ -1 +1,2 @@ +warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete access point "ap-88888"? (y/n): Requested to delete access point "ap-88888". diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden index ef273e8c24..608515e2f6 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden @@ -1,3 +1,6 @@ +warning: GOCOVERDIR not set, no coverage data emitted ap-99999 my-aws-ingress-access-point +ap-11111 my-azure-ingress-access-point +ap-22222 my-gcp-ingress-access-point :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden index 8745067043..e0cabd76cf 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted { "id": "ap-99999", "name": "my-aws-ingress-access-point", diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden index 31fe1d3c41..8868cdc88b 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------------------------+---------------------------------------------------------+ | ID | ap-99999 | | Name | my-aws-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden new file mode 100644 index 0000000000..2f6d0e7bd5 --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden @@ -0,0 +1,12 @@ +warning: GOCOVERDIR not set, no coverage data emitted +{ + "id": "ap-11111", + "name": "my-azure-ingress-access-point", + "environment": "env-596", + "gateway": "gw-11111", + "phase": "READY", + "azure_private_link_service_alias": "azure-pls-alias.eastus.azure.privatelinkservice", + "azure_private_link_service_resource_id": "/subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName", + "azure_private_endpoint_resource_id": "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + "dns_domain": "ap11111.eastus.azure.accesspoint.confluent.cloud" +} diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden new file mode 100644 index 0000000000..bc2056b0f7 --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden @@ -0,0 +1,12 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| ID | ap-11111 | +| Name | my-azure-ingress-access-point | +| Environment | env-596 | +| Gateway | gw-11111 | +| Phase | READY | +| Azure Private Link Service Alias | azure-pls-alias.eastus.azure.privatelinkservice | +| Azure Private Link Service Resource ID | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName | +| Azure Private Endpoint Resource ID | /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName | +| DNS Domain | ap11111.eastus.azure.accesspoint.confluent.cloud | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden new file mode 100644 index 0000000000..1733c1eef5 --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden @@ -0,0 +1,11 @@ +warning: GOCOVERDIR not set, no coverage data emitted +{ + "id": "ap-22222", + "name": "my-gcp-ingress-access-point", + "environment": "env-596", + "gateway": "gw-99999", + "phase": "READY", + "gcp_private_service_connect_service_attachment": "projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName", + "gcp_private_service_connect_connection_id": "111111111111111111", + "dns_domain": "ap22222.us-central1.gcp.accesspoint.confluent.cloud" +} diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden new file mode 100644 index 0000000000..099da834dc --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden @@ -0,0 +1,11 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------+-----------------------------------------------------------------------------------+ +| ID | ap-22222 | +| Name | my-gcp-ingress-access-point | +| Environment | env-596 | +| Gateway | gw-99999 | +| Phase | READY | +| GCP PSC Service Attachment | projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName | +| GCP PSC Connection ID | 111111111111111111 | +| DNS Domain | ap22222.us-central1.gcp.accesspoint.confluent.cloud | ++----------------------------+-----------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden index d22b6d3237..62a886f84c 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden @@ -1,4 +1,26 @@ +warning: GOCOVERDIR not set, no coverage data emitted [ + { + "id": "ap-11111", + "name": "my-azure-ingress-access-point", + "environment": "env-596", + "gateway": "gw-11111", + "phase": "READY", + "azure_private_link_service_alias": "azure-pls-alias.eastus.azure.privatelinkservice", + "azure_private_link_service_resource_id": "/subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName", + "azure_private_endpoint_resource_id": "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + "dns_domain": "ap11111.eastus.azure.accesspoint.confluent.cloud" + }, + { + "id": "ap-22222", + "name": "my-gcp-ingress-access-point", + "environment": "env-596", + "gateway": "gw-99999", + "phase": "READY", + "gcp_private_service_connect_service_attachment": "projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName", + "gcp_private_service_connect_connection_id": "111111111111111111", + "dns_domain": "ap22222.us-central1.gcp.accesspoint.confluent.cloud" + }, { "id": "ap-99999", "name": "my-aws-ingress-access-point", diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden index 8c96cff753..9fc1d6aa7b 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden @@ -1,3 +1,7 @@ - ID | Name | Environment | Gateway | Phase | AWS VPC Endpoint ID | AWS VPC Endpoint Service Name | DNS Domain ------------+-----------------------------+-------------+----------+-------+------------------------+---------------------------------------------------------+----------------------------------------------------- - ap-99999 | my-aws-ingress-access-point | env-596 | gw-88888 | READY | vpce-1234567890abcdef0 | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | ap123abc.us-west-2.aws.accesspoint.confluent.cloud +warning: GOCOVERDIR not set, no coverage data emitted + ID | Name | Environment | Gateway | Phase | AWS VPC Endpoint ID | AWS VPC Endpoint Service Name | Azure Private Link Service | Azure Private Link Service | Azure Private Endpoint | GCP PSC Service Attachment | GCP PSC Connection ID | DNS Domain + | | | | | | | Alias | Resource ID | Resource ID | | | +-----------+-------------------------------+-------------+----------+-------+------------------------+---------------------------------------------------------+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------------------+------------------------------------------------------ + ap-11111 | my-azure-ingress-access-point | env-596 | gw-11111 | READY | | | azure-pls-alias.eastus.azure.privatelinkservice | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName | /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName | | | ap11111.eastus.azure.accesspoint.confluent.cloud + ap-22222 | my-gcp-ingress-access-point | env-596 | gw-99999 | READY | | | | | | projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName | 111111111111111111 | ap22222.us-central1.gcp.accesspoint.confluent.cloud + ap-99999 | my-aws-ingress-access-point | env-596 | gw-88888 | READY | vpce-1234567890abcdef0 | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | ap123abc.us-west-2.aws.accesspoint.confluent.cloud diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden index 8840fd58b6..69c79c5b8b 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden @@ -1,4 +1,7 @@ +warning: GOCOVERDIR not set, no coverage data emitted --name Name of the ingress endpoint. ap-99999 my-aws-ingress-access-point +ap-11111 my-azure-ingress-access-point +ap-22222 my-gcp-ingress-access-point :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden index b4c5eaa74b..1829980547 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden @@ -1,3 +1,4 @@ +warning: GOCOVERDIR not set, no coverage data emitted +-------------+---------------------------------+ | ID | ap-88888 | | Name | my-new-aws-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden new file mode 100644 index 0000000000..ac98e10421 --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden @@ -0,0 +1,12 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ +| ID | ap-11111 | +| Name | my-new-azure-ingress-access-point | +| Environment | env-596 | +| Gateway | gw-11111 | +| Phase | READY | +| Azure Private Link Service Alias | azure-pls-alias.eastus.azure.privatelinkservice | +| Azure Private Link Service Resource ID | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName | +| Azure Private Endpoint Resource ID | /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName | +| DNS Domain | ap11111.eastus.azure.accesspoint.confluent.cloud | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden new file mode 100644 index 0000000000..68d0d3054b --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden @@ -0,0 +1,11 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++----------------------------+-----------------------------------------------------------------------------------+ +| ID | ap-22222 | +| Name | my-new-gcp-ingress-access-point | +| Environment | env-596 | +| Gateway | gw-99999 | +| Phase | READY | +| GCP PSC Service Attachment | projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName | +| GCP PSC Connection ID | 111111111111111111 | +| DNS Domain | ap22222.us-central1.gcp.accesspoint.confluent.cloud | ++----------------------------+-----------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/create-azure-ingress.golden b/test/fixtures/output/network/gateway/create-azure-ingress.golden new file mode 100644 index 0000000000..4aea3a2201 --- /dev/null +++ b/test/fixtures/output/network/gateway/create-azure-ingress.golden @@ -0,0 +1,12 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| ID | gw-abc123 | +| Name | my-azure-ingress-gateway | +| Environment | env-596 | +| Region | eastus2 | +| Type | AzureIngressPrivateLink | +| Azure Private Link Service | azure-ingress-pl.eastus2.azure.privatelinkservice | +| Alias | | +| Azure Private Link Resource ID | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | +| Phase | READY | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden b/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden new file mode 100644 index 0000000000..d746c8371a --- /dev/null +++ b/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden @@ -0,0 +1,2 @@ +warning: GOCOVERDIR not set, no coverage data emitted +Are you sure you want to delete gateways "gw-11111" and "gw-67890"? (y/n): Requested to delete gateways "gw-11111" and "gw-67890". diff --git a/test/fixtures/output/network/gateway/delete-azure-ingress.golden b/test/fixtures/output/network/gateway/delete-azure-ingress.golden new file mode 100644 index 0000000000..4cf9d835d7 --- /dev/null +++ b/test/fixtures/output/network/gateway/delete-azure-ingress.golden @@ -0,0 +1,2 @@ +warning: GOCOVERDIR not set, no coverage data emitted +Are you sure you want to delete gateway "gw-11111"? (y/n): Requested to delete gateway "gw-11111". diff --git a/test/fixtures/output/network/gateway/describe-autocomplete.golden b/test/fixtures/output/network/gateway/describe-autocomplete.golden index b9828fe0cb..c7734fcc9b 100644 --- a/test/fixtures/output/network/gateway/describe-autocomplete.golden +++ b/test/fixtures/output/network/gateway/describe-autocomplete.golden @@ -8,5 +8,6 @@ gw-13570 my-gcp-peering-gateway gw-07531 my-gcp-gateway gw-88888 my-aws-ingress-gateway gw-99999 my-gcp-ingress-gateway +gw-11111 my-azure-ingress-gateway :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/gateway/describe-azure-ingress.golden b/test/fixtures/output/network/gateway/describe-azure-ingress.golden new file mode 100644 index 0000000000..cfb5c6c926 --- /dev/null +++ b/test/fixtures/output/network/gateway/describe-azure-ingress.golden @@ -0,0 +1,12 @@ +warning: GOCOVERDIR not set, no coverage data emitted ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ +| ID | gw-11111 | +| Name | my-azure-ingress-gateway | +| Environment | env-596 | +| Region | eastus2 | +| Type | AzureIngressPrivateLink | +| Azure Private Link Service | azure-ingress-pl.eastus2.azure.privatelinkservice | +| Alias | | +| Azure Private Link Resource ID | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | +| Phase | READY | ++--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/list-json.golden b/test/fixtures/output/network/gateway/list-json.golden index 1489f78388..ef00585a79 100644 --- a/test/fixtures/output/network/gateway/list-json.golden +++ b/test/fixtures/output/network/gateway/list-json.golden @@ -17,6 +17,16 @@ warning: GOCOVERDIR not set, no coverage data emitted "type": "AzurePeering", "phase": "READY" }, + { + "id": "gw-11111", + "name": "my-azure-ingress-gateway", + "environment": "env-596", + "region": "eastus2", + "type": "AzureIngressPrivateLink", + "azure_private_link_service_alias": "azure-ingress-pl.eastus2.azure.privatelinkservice", + "azure_private_link_service_resource_id": "/subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl", + "phase": "READY" + }, { "id": "gw-12345", "name": "my-aws-gateway", diff --git a/test/fixtures/output/network/gateway/list.golden b/test/fixtures/output/network/gateway/list.golden index 641e8e7513..53f8f24792 100644 --- a/test/fixtures/output/network/gateway/list.golden +++ b/test/fixtures/output/network/gateway/list.golden @@ -1,12 +1,14 @@ warning: GOCOVERDIR not set, no coverage data emitted - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message ------------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- - gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | project-12345 | | READY | | | - gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | READY | | | - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | READY | | | - gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | - gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | READY | | | - gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | READY | | | - gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | READY | | | - gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- + gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | | | project-12345 | | READY | | | + gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | + gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | + gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/network_test.go b/test/network_test.go index c8d10ae1d4..0e83d6c260 100644 --- a/test/network_test.go +++ b/test/network_test.go @@ -126,9 +126,12 @@ func (s *CLITestSuite) TestNetworkGateway() { {args: "network gateway create my-gateway --cloud aws --type ingress-privatelink --region us-west-2", fixture: "network/gateway/create-aws-ingress.golden"}, {args: "network gateway create my-gateway --cloud aws --type private-network-interface --region us-west-2 --zones us-west-2a,us-west-2b", fixture: "network/gateway/create-aws-private-network-interface.golden"}, {args: "network gateway create my-gcp-ingress-gateway --cloud gcp --type ingress-private-service-connect --region us-central1", fixture: "network/gateway/create-gcp-ingress.golden"}, + {args: "network gateway create my-azure-ingress-gateway --cloud azure --type ingress-privatelink --region eastus2", fixture: "network/gateway/create-azure-ingress.golden"}, {args: "network gateway update gw-111111 --name new-name", fixture: "network/gateway/update.golden"}, {args: "network gateway delete gw-12345", input: "y\n", fixture: "network/gateway/delete.golden"}, {args: "network gateway delete gw-12345 gw-54321", input: "y\n", fixture: "network/gateway/delete-multiple.golden"}, + {args: "network gateway delete gw-11111", input: "y\n", fixture: "network/gateway/delete-azure-ingress.golden"}, + {args: "network gateway delete gw-11111 gw-67890", input: "y\n", fixture: "network/gateway/delete-azure-ingress-multiple.golden"}, {args: "network gateway delete gw-invalid", input: "y\n", fixture: "network/gateway/delete-fail.golden", exitCode: 1}, } @@ -147,6 +150,7 @@ func (s *CLITestSuite) TestNetworkGatewayDescribe() { {args: "network gateway describe gw-07531", fixture: "network/gateway/describe-gcp.golden"}, {args: "network gateway describe gw-99999", fixture: "network/gateway/describe-gcp-ingress.golden"}, {args: "network gateway describe gw-67890", fixture: "network/gateway/describe-azure.golden"}, + {args: "network gateway describe gw-11111", fixture: "network/gateway/describe-azure-ingress.golden"}, {args: "network gateway describe gw-12345 --output json", fixture: "network/gateway/describe-aws-json.golden"}, {args: "network gateway describe gw-88888 --output json", fixture: "network/gateway/describe-aws-ingress-json.golden"}, } @@ -1171,7 +1175,11 @@ func (s *CLITestSuite) TestNetworkAccessPointPrivateLinkIngressEndpoint() { tests := []CLITest{ {args: "network access-point private-link ingress-endpoint create --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0", fixture: "network/access-point/private-link/ingress-endpoint/create-aws.golden"}, {args: "network access-point private-link ingress-endpoint create my-ingress-endpoint --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0", fixture: "network/access-point/private-link/ingress-endpoint/create-aws-name.golden"}, + {args: "network access-point private-link ingress-endpoint create --cloud azure --gateway gw-11111 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", fixture: "network/access-point/private-link/ingress-endpoint/create-azure.golden"}, + {args: "network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-99999 --private-service-connect-connection-id 111111111111111111", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp.golden"}, {args: "network access-point private-link ingress-endpoint update ap-88888 --name my-new-aws-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-aws.golden"}, + {args: "network access-point private-link ingress-endpoint update ap-11111 --name my-new-azure-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-azure.golden"}, + {args: "network access-point private-link ingress-endpoint update ap-22222 --name my-new-gcp-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-gcp.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-88888", input: "y\n", fixture: "network/access-point/private-link/ingress-endpoint/delete.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-99999 ap-88888", input: "y\n", fixture: "network/access-point/private-link/ingress-endpoint/delete-multiple.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-invalid", fixture: "network/access-point/private-link/ingress-endpoint/delete-fail.golden", exitCode: 1}, @@ -1187,6 +1195,10 @@ func (s *CLITestSuite) TestNetworkAccessPointPrivateLinkIngressEndpointDescribe( tests := []CLITest{ {args: "network access-point private-link ingress-endpoint describe ap-99999", fixture: "network/access-point/private-link/ingress-endpoint/describe-aws.golden"}, {args: "network access-point private-link ingress-endpoint describe ap-99999 --output json", fixture: "network/access-point/private-link/ingress-endpoint/describe-aws-json.golden"}, + {args: "network access-point private-link ingress-endpoint describe ap-11111", fixture: "network/access-point/private-link/ingress-endpoint/describe-azure.golden"}, + {args: "network access-point private-link ingress-endpoint describe ap-11111 --output json", fixture: "network/access-point/private-link/ingress-endpoint/describe-azure-json.golden"}, + {args: "network access-point private-link ingress-endpoint describe ap-22222", fixture: "network/access-point/private-link/ingress-endpoint/describe-gcp.golden"}, + {args: "network access-point private-link ingress-endpoint describe ap-22222 --output json", fixture: "network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden"}, } for _, test := range tests { diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index c9703ceb6f..b623391120 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -12,7 +12,7 @@ import ( "github.com/gorilla/mux" "github.com/stretchr/testify/require" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1" networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" networkingipv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-ip/v1" @@ -2386,6 +2386,11 @@ func getGateway(id, environment, name, specConfigKind, statusCloudGatewayKind st Kind: specConfigKind, Region: "eastus", })) + case "AzureIngressPrivateLinkGatewaySpec": + gateway.Spec.SetConfig(networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewaySpecAsNetworkingV1GatewaySpecConfigOneOf(&networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewaySpec{ + Kind: specConfigKind, + Region: "eastus2", + })) case "GcpIngressPrivateServiceConnectGatewaySpec": gateway.Spec.SetConfig(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpecAsNetworkingV1GatewaySpecConfigOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec{ Kind: specConfigKind, @@ -2424,6 +2429,12 @@ func getGateway(id, environment, name, specConfigKind, statusCloudGatewayKind st Kind: statusCloudGatewayKind, Project: networkinggatewayv1.PtrString("project-12345"), })) + case "AzureIngressPrivateLinkGatewayStatus": + gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewayStatus{ + Kind: statusCloudGatewayKind, + PrivateLinkServiceAlias: networkinggatewayv1.PtrString("azure-ingress-pl.eastus2.azure.privatelinkservice"), + PrivateLinkServiceResourceId: networkinggatewayv1.PtrString("/subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl"), + })) case "GcpIngressPrivateServiceConnectGatewayStatus": gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus{ Kind: statusCloudGatewayKind, @@ -2474,6 +2485,10 @@ func handleNetworkingGatewayGet(t *testing.T, id, environment string) http.Handl record := getGateway(id, environment, "my-gcp-ingress-gateway", "GcpIngressPrivateServiceConnectGatewaySpec", "GcpIngressPrivateServiceConnectGatewayStatus") err := json.NewEncoder(w).Encode(record) require.NoError(t, err) + case "gw-11111": + record := getGateway(id, environment, "my-azure-ingress-gateway", "AzureIngressPrivateLinkGatewaySpec", "AzureIngressPrivateLinkGatewayStatus") + err := json.NewEncoder(w).Encode(record) + require.NoError(t, err) } } } @@ -2522,6 +2537,12 @@ func handleNetworkingGatewayPost(t *testing.T) http.HandlerFunc { Kind: "AzureEgressPrivateLinkGatewayStatus", Subscription: networkingv1.PtrString("aa000000-a000-0a00-00aa-0000aaa0a0a0"), })) + } else if body.Spec.Config.NetworkingV1AzureIngressPrivateLinkGatewaySpec != nil { + gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1AzureIngressPrivateLinkGatewayStatus{ + Kind: "AzureIngressPrivateLinkGatewayStatus", + PrivateLinkServiceAlias: networkingv1.PtrString("azure-ingress-pl.eastus2.azure.privatelinkservice"), + PrivateLinkServiceResourceId: networkingv1.PtrString("/subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl"), + })) } else if body.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus{ Kind: "GcpEgressPrivateServiceConnectGatewayStatus", @@ -2562,8 +2583,9 @@ func handleNetworkingGatewayList(t *testing.T, environment string) http.HandlerF gatewaySeven := getGateway("gw-07531", environment, "my-gcp-gateway", "GcpEgressPrivateServiceConnectGatewaySpec", "GcpEgressPrivateServiceConnectGatewayStatus") gatewayEight := getGateway("gw-88888", environment, "my-aws-ingress-gateway", "AwsIngressPrivateLinkGatewaySpec", "AwsIngressPrivateLinkGatewayStatus") gatewayNine := getGateway("gw-99999", environment, "my-gcp-ingress-gateway", "GcpIngressPrivateServiceConnectGatewaySpec", "GcpIngressPrivateServiceConnectGatewayStatus") + gatewayTen := getGateway("gw-11111", environment, "my-azure-ingress-gateway", "AzureIngressPrivateLinkGatewaySpec", "AzureIngressPrivateLinkGatewayStatus") - gatewayList := networkinggatewayv1.NetworkingV1GatewayList{Data: []networkinggatewayv1.NetworkingV1Gateway{gatewayOne, gatewayTwo, gatewayThree, gatewayFour, gatewayFive, gatewaySix, gatewaySeven, gatewayEight, gatewayNine}} + gatewayList := networkinggatewayv1.NetworkingV1GatewayList{Data: []networkinggatewayv1.NetworkingV1Gateway{gatewayOne, gatewayTwo, gatewayThree, gatewayFour, gatewayFive, gatewaySix, gatewaySeven, gatewayEight, gatewayNine, gatewayTen}} gatewayList.Data = filterGatewayList(gatewayList.Data, gatewayTypes, ids, regions, displayNames, phases) setPageToken(&gatewayList, &gatewayList.Metadata, r.URL) err := json.NewEncoder(w).Encode(gatewayList) @@ -2636,6 +2658,9 @@ func getGatewayTypeFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) str if config.NetworkingV1AzureEgressPrivateLinkGatewaySpec != nil { return "AzureEgressPrivateLink" } + if config.NetworkingV1AzureIngressPrivateLinkGatewaySpec != nil { + return "AzureIngressPrivateLink" + } if config.NetworkingV1AzurePeeringGatewaySpec != nil { return "AzurePeering" } @@ -2672,6 +2697,9 @@ func getRegionFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) string { if config.NetworkingV1AzureEgressPrivateLinkGatewaySpec != nil { return config.NetworkingV1AzureEgressPrivateLinkGatewaySpec.GetRegion() } + if config.NetworkingV1AzureIngressPrivateLinkGatewaySpec != nil { + return config.NetworkingV1AzureIngressPrivateLinkGatewaySpec.GetRegion() + } if config.NetworkingV1AzurePeeringGatewaySpec != nil { return config.NetworkingV1AzurePeeringGatewaySpec.GetRegion() } @@ -3125,6 +3153,63 @@ func getAwsIngressAccessPoint(id, environment, name string) networkingaccesspoin } } +func getAzureIngressAccessPoint(id, environment, name string) networkingaccesspointv1.NetworkingV1AccessPoint { + return networkingaccesspointv1.NetworkingV1AccessPoint{ + Id: networkingaccesspointv1.PtrString(id), + Spec: &networkingaccesspointv1.NetworkingV1AccessPointSpec{ + DisplayName: networkingaccesspointv1.PtrString(name), + Config: &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ + NetworkingV1AzureIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpoint{ + Kind: "AzureIngressPrivateLinkEndpoint", + PrivateEndpointResourceId: "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + }, + }, + Environment: &networkingaccesspointv1.ObjectReference{Id: environment}, + Gateway: &networkingaccesspointv1.ObjectReference{Id: "gw-11111"}, + }, + Status: &networkingaccesspointv1.NetworkingV1AccessPointStatus{ + Phase: "READY", + Config: &networkingaccesspointv1.NetworkingV1AccessPointStatusConfigOneOf{ + NetworkingV1AzureIngressPrivateLinkEndpointStatus: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpointStatus{ + Kind: "AzureIngressPrivateLinkEndpointStatus", + PrivateLinkServiceAlias: "azure-pls-alias.eastus.azure.privatelinkservice", + PrivateLinkServiceResourceId: "/subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName", + PrivateEndpointResourceId: "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + DnsDomain: networkingaccesspointv1.PtrString("ap11111.eastus.azure.accesspoint.confluent.cloud"), + }, + }, + }, + } +} + +func getGcpIngressAccessPoint(id, environment, name string) networkingaccesspointv1.NetworkingV1AccessPoint { + return networkingaccesspointv1.NetworkingV1AccessPoint{ + Id: networkingaccesspointv1.PtrString(id), + Spec: &networkingaccesspointv1.NetworkingV1AccessPointSpec{ + DisplayName: networkingaccesspointv1.PtrString(name), + Config: &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ + NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ + Kind: "GcpIngressPrivateServiceConnectEndpoint", + PrivateServiceConnectConnectionId: "111111111111111111", + }, + }, + Environment: &networkingaccesspointv1.ObjectReference{Id: environment}, + Gateway: &networkingaccesspointv1.ObjectReference{Id: "gw-99999"}, + }, + Status: &networkingaccesspointv1.NetworkingV1AccessPointStatus{ + Phase: "READY", + Config: &networkingaccesspointv1.NetworkingV1AccessPointStatusConfigOneOf{ + NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus{ + Kind: "GcpIngressPrivateServiceConnectEndpointStatus", + PrivateServiceConnectServiceAttachment: "projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName", + PrivateServiceConnectConnectionId: "111111111111111111", + DnsDomain: networkingaccesspointv1.PtrString("ap22222.us-central1.gcp.accesspoint.confluent.cloud"), + }, + }, + }, + } +} + func handleNetworkingAccessPointGet(t *testing.T, id, environment string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { var accessPoint networkingaccesspointv1.NetworkingV1AccessPoint @@ -3141,6 +3226,10 @@ func handleNetworkingAccessPointGet(t *testing.T, id, environment string) http.H accessPoint = getGcpEgressAccessPoint(id, environment, "my-gcp-egress-access-point") case "ap-99999": accessPoint = getAwsIngressAccessPoint(id, environment, "my-aws-ingress-access-point") + case "ap-11111": + accessPoint = getAzureIngressAccessPoint(id, environment, "my-azure-ingress-access-point") + case "ap-22222": + accessPoint = getGcpIngressAccessPoint(id, environment, "my-gcp-ingress-access-point") } err := json.NewEncoder(w).Encode(accessPoint) require.NoError(t, err) @@ -3177,6 +3266,10 @@ func handleNetworkingAccessPointUpdate(t *testing.T, id string) http.HandlerFunc accessPoint = getGcpEgressAccessPoint(id, body.Spec.Environment.GetId(), "my-gcp-egress-access-point") case "ap-99999": accessPoint = getAwsIngressAccessPoint(id, body.Spec.Environment.GetId(), "my-aws-ingress-access-point") + case "ap-11111": + accessPoint = getAzureIngressAccessPoint(id, body.Spec.Environment.GetId(), "my-azure-ingress-access-point") + case "ap-22222": + accessPoint = getGcpIngressAccessPoint(id, body.Spec.Environment.GetId(), "my-gcp-ingress-access-point") } accessPoint.Spec.SetDisplayName(body.Spec.GetDisplayName()) @@ -3193,8 +3286,10 @@ func handleNetworkingAccessPointList(t *testing.T, environment string) http.Hand accessPointThree := getAwsPrivateNetworkInterfaceAccessPoint("ap-54321", environment, "my-aws-private-network-interface-access-point") accessPointFour := getGcpEgressAccessPoint("ap-88888", environment, "my-gcp-egress-access-point") accessPointFive := getAwsIngressAccessPoint("ap-99999", environment, "my-aws-ingress-access-point") + accessPointSix := getAzureIngressAccessPoint("ap-11111", environment, "my-azure-ingress-access-point") + accessPointSeven := getGcpIngressAccessPoint("ap-22222", environment, "my-gcp-ingress-access-point") - recordList := networkingaccesspointv1.NetworkingV1AccessPointList{Data: []networkingaccesspointv1.NetworkingV1AccessPoint{accessPointOne, accessPointTwo, accessPointThree, accessPointFour, accessPointFive}} + recordList := networkingaccesspointv1.NetworkingV1AccessPointList{Data: []networkingaccesspointv1.NetworkingV1AccessPoint{accessPointOne, accessPointTwo, accessPointThree, accessPointFour, accessPointFive, accessPointSix, accessPointSeven}} setPageToken(&recordList, &recordList.Metadata, r.URL) err := json.NewEncoder(w).Encode(recordList) require.NoError(t, err) @@ -3264,6 +3359,33 @@ func handleNetworkingAccessPointCreate(t *testing.T) http.HandlerFunc { }, }, } + } else if accessPoint.Spec.Config.NetworkingV1AzureIngressPrivateLinkEndpoint != nil { + accessPoint.SetId("ap-11111") + accessPoint.Status = &networkingaccesspointv1.NetworkingV1AccessPointStatus{ + Phase: "READY", + Config: &networkingaccesspointv1.NetworkingV1AccessPointStatusConfigOneOf{ + NetworkingV1AzureIngressPrivateLinkEndpointStatus: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpointStatus{ + Kind: "AzureIngressPrivateLinkEndpointStatus", + PrivateLinkServiceAlias: "azure-pls-alias.eastus.azure.privatelinkservice", + PrivateLinkServiceResourceId: "/subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName", + PrivateEndpointResourceId: "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + DnsDomain: networkingaccesspointv1.PtrString("ap11111.eastus.azure.accesspoint.confluent.cloud"), + }, + }, + } + } else if accessPoint.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpoint != nil { + accessPoint.SetId("ap-22222") + accessPoint.Status = &networkingaccesspointv1.NetworkingV1AccessPointStatus{ + Phase: "READY", + Config: &networkingaccesspointv1.NetworkingV1AccessPointStatusConfigOneOf{ + NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus{ + Kind: "GcpIngressPrivateServiceConnectEndpointStatus", + PrivateServiceConnectServiceAttachment: "projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName", + PrivateServiceConnectConnectionId: "111111111111111111", + DnsDomain: networkingaccesspointv1.PtrString("ap22222.us-central1.gcp.accesspoint.confluent.cloud"), + }, + }, + } } err = json.NewEncoder(w).Encode(accessPoint) From 948299b707cce6647aa496507410d3b1c44c8665 Mon Sep 17 00:00:00 2001 From: Andrew Veenstra Date: Wed, 1 Apr 2026 17:44:37 -0400 Subject: [PATCH 04/18] Upgrade networking-gateway and networking-access-point to v0.13.0 Co-Authored-By: Claude Opus 4.6 --- go.mod | 4 ++-- go.sum | 8 ++++---- pkg/ccloudv2/networking-gateway.go | 10 +++++----- pkg/ccloudv2/networking_access_point.go | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 3457fe342f..7ed8f81a73 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( github.com/charmbracelet/lipgloss v0.11.0 github.com/client9/gospell v0.0.0-20160306015952-90dfc71015df github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 - github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.12.0 - github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 + github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.13.0 + github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.13.0 github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 github.com/confluentinc/ccloud-sdk-go-v2/billing v0.3.0 diff --git a/go.sum b/go.sum index f938f8af45..720b0e5e64 100644 --- a/go.sum +++ b/go.sum @@ -188,10 +188,10 @@ github.com/compose-spec/compose-go/v2 v2.1.3 h1:bD67uqLuL/XgkAK6ir3xZvNLFPxPScEi github.com/compose-spec/compose-go/v2 v2.1.3/go.mod h1:lFN0DrMxIncJGYAXTfWuajfwj5haBJqrBkarHcnjJKc= github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 h1:19qEGhkbZa5fopKCe0VPIV+Sasby4Pv10z9ZaktwWso= github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52/go.mod h1:62EMf+5uFEt1BJ2q8WMrUoI9VUSxAbDnmZCGRt/MbA0= -github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.12.0 h1:eeJPL6TpJddJOwStebbW2Y2IYXJrNrLqe0u9EUaAGr4= -github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.12.0/go.mod h1:mFYZvHI92ChlfghLNpnXNxkwX33jEAUXQ5w0/Ri3OQY= -github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0 h1:xD/maPHZjgexJNsXu0zmeU1CXUXPlmnCDUK+t/ighw0= -github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.12.0/go.mod h1:Nq00w3h+2vpEi+8w1f+lgmNu5m3mHogOzpw8/JzUL6k= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.13.0 h1:crG9ZKL8WlY7fX1ooSsODyNKSLhWuOpvThQ/GYlDjK0= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.13.0/go.mod h1:94S6dsLwNBa6zumSRQi81/aM750kLu+HJFXd4jcJz7A= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.13.0 h1:RDHQh6GcaL6JrZock9jsPQCUiwHNNZBiJOrXt7/v2lw= +github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.13.0/go.mod h1:xr1v1dpdLoFSozNL4Qiv4gNjVlaTgr7mBMVnfjtzdas= github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 h1:zSF4OQUJXWH2JeAo9rsq13ibk+JFdzITGR8S7cFMpzw= github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0/go.mod h1:DoxqzzF3JzvJr3fWkvCiOHFlE0GoYpozWxFZ1Ud9ntA= github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 h1:8fWyLwMuy8ec0MVF5Avd54UvbIxhDFhZzanHBVwgxdw= diff --git a/pkg/ccloudv2/networking-gateway.go b/pkg/ccloudv2/networking-gateway.go index b8f5f53613..607ba5a7ce 100644 --- a/pkg/ccloudv2/networking-gateway.go +++ b/pkg/ccloudv2/networking-gateway.go @@ -67,19 +67,19 @@ func (c *Client) executeListNetworkGateways(environment, pageToken string, types req := c.NetworkingGatewayClient.GatewaysNetworkingV1Api.ListNetworkingV1Gateways(c.networkingGatewayApiContext()).Environment(environment).PageSize(ccloudV2ListPageSize) if len(types) > 0 { - req = req.GatewayType(networkinggatewayv1.MultipleSearchFilter{Items: types}) + req = req.GatewayType(types) } if len(ids) > 0 { - req = req.Id(networkinggatewayv1.MultipleSearchFilter{Items: ids}) + req = req.Id(ids) } if len(regions) > 0 { - req = req.SpecConfigRegion(networkinggatewayv1.MultipleSearchFilter{Items: regions}) + req = req.SpecConfigRegion(regions) } if len(displayNames) > 0 { - req = req.SpecDisplayName(networkinggatewayv1.MultipleSearchFilter{Items: displayNames}) + req = req.SpecDisplayName(displayNames) } if len(phases) > 0 { - req = req.StatusPhase(networkinggatewayv1.MultipleSearchFilter{Items: phases}) + req = req.StatusPhase(phases) } if pageToken != "" { req = req.PageToken(pageToken) diff --git a/pkg/ccloudv2/networking_access_point.go b/pkg/ccloudv2/networking_access_point.go index cd400b7f04..8df52b0e65 100644 --- a/pkg/ccloudv2/networking_access_point.go +++ b/pkg/ccloudv2/networking_access_point.go @@ -57,7 +57,7 @@ func (c *Client) executeListNetworkAccessPoints(environment, pageToken string, n } if names != nil { - req = req.SpecDisplayName(networkingaccesspointv1.MultipleSearchFilter{Items: names}) + req = req.SpecDisplayName(names) } resp, httpResp, err := req.Execute() @@ -111,19 +111,19 @@ func (c *Client) executeListNetworkDnsRecords(environment, pageToken string, lis } if listParameters.Gateways != nil { - req = req.SpecGateway(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.Gateways}) + req = req.SpecGateway(listParameters.Gateways) } if listParameters.Domains != nil { - req = req.SpecDomain(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.Domains}) + req = req.SpecDomain(listParameters.Domains) } if listParameters.Names != nil { - req = req.SpecDisplayName(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.Names}) + req = req.SpecDisplayName(listParameters.Names) } if listParameters.ResourceIds != nil { - req = req.Resource(networkingaccesspointv1.MultipleSearchFilter{Items: listParameters.ResourceIds}) + req = req.Resource(listParameters.ResourceIds) } resp, httpResp, err := req.Execute() From d0b9ab4acfb44d35da328c5398abf235accd3328 Mon Sep 17 00:00:00 2001 From: Andrew Veenstra Date: Fri, 3 Apr 2026 17:22:40 -0400 Subject: [PATCH 05/18] Fix GCP gateway type naming to match networking API The networking API uses GcpEgressPrivateLink and GcpIngressPrivateLink, but the CLI was using GcpEgressPrivateServiceConnect and GcpIngressPrivateServiceConnect, causing type filtering to fail. Accept both gcp-*-privatelink and gcp-*-private-service-connect as input for backward compatibility. Co-Authored-By: Claude Opus 4.6 --- internal/network/command_gateway.go | 24 +++++++++-------- internal/network/command_gateway_list.go | 8 +++--- .../network/gateway/create-gcp-ingress.golden | 2 +- .../gateway/describe-gcp-ingress.golden | 2 +- .../network/gateway/describe-gcp.golden | 18 ++++++------- .../network/gateway/list-filter-id.golden | 5 +++- .../gateway/list-filter-multiple.golden | 5 +++- .../network/gateway/list-filter-name.golden | 6 ++++- .../network/gateway/list-filter-phase.golden | 14 +++++++++- .../network/gateway/list-filter-region.golden | 5 +++- .../network/gateway/list-filter-type.golden | 5 +++- .../output/network/gateway/list-json.golden | 4 +-- .../output/network/gateway/list.golden | 26 +++++++++---------- test/test-server/networking_handlers.go | 4 +-- 14 files changed, 79 insertions(+), 49 deletions(-) diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 40e6be96c7..a5fed1448d 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -24,21 +24,23 @@ const ( azurePeering = "AzurePeering" awsPrivateNetworkInterface = "AwsPrivateNetworkInterface" gcpPeering = "GcpPeering" - gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" - gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" + gcpEgressPrivateLink = "GcpEgressPrivateLink" + gcpIngressPrivateLink = "GcpIngressPrivateLink" azureIngressPrivateLink = "AzureIngressPrivateLink" ) var ( createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface", "ingress-private-service-connect"} - listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} // TODO: check if we accept private-network-interface here + listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-privatelink", "gcp-ingress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} gatewayTypeMap = map[string]string{ "aws-egress-privatelink": awsEgressPrivateLink, "aws-ingress-privatelink": awsIngressPrivateLink, "azure-egress-privatelink": azureEgressPrivateLink, "azure-ingress-privatelink": azureIngressPrivateLink, - "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, - "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, + "gcp-egress-privatelink": gcpEgressPrivateLink, + "gcp-ingress-privatelink": gcpIngressPrivateLink, + "gcp-egress-private-service-connect": gcpEgressPrivateLink, + "gcp-ingress-private-service-connect": gcpIngressPrivateLink, } ) @@ -199,11 +201,11 @@ func getGatewayType(gateway networkinggatewayv1.NetworkingV1Gateway) (string, er } if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { - return gcpEgressPrivateServiceConnect, nil + return gcpEgressPrivateLink, nil } if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { - return gcpIngressPrivateServiceConnect, nil + return gcpIngressPrivateLink, nil } return "", fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "config") @@ -253,10 +255,10 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin out.Region = gateway.Spec.Config.NetworkingV1AwsPrivateNetworkInterfaceGatewaySpec.GetRegion() out.Zones = gateway.Spec.Config.NetworkingV1AwsPrivateNetworkInterfaceGatewaySpec.GetZones() } - if gatewayType == gcpEgressPrivateServiceConnect { + if gatewayType == gcpEgressPrivateLink { out.Region = gateway.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } - if gatewayType == gcpIngressPrivateServiceConnect { + if gatewayType == gcpIngressPrivateLink { out.Region = gateway.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() } if gatewayType == gcpPeering { @@ -280,9 +282,9 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin out.AzurePrivateLinkServiceResourceId = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceResourceId() } case pcloud.Gcp: - if gatewayType == gcpEgressPrivateServiceConnect { + if gatewayType == gcpEgressPrivateLink { out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() - } else if gatewayType == gcpIngressPrivateServiceConnect { + } else if gatewayType == gcpIngressPrivateLink { out.GcpPrivateServiceConnectServiceAttachment = gateway.Status.CloudGateway.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus.GetPrivateServiceConnectServiceAttachment() } else if gatewayType == gcpPeering { out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() diff --git a/internal/network/command_gateway_list.go b/internal/network/command_gateway_list.go index 92b31efaf4..1de2803dda 100644 --- a/internal/network/command_gateway_list.go +++ b/internal/network/command_gateway_list.go @@ -131,10 +131,10 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { if gateway.Spec.Config != nil && gateway.Spec.Config.NetworkingV1GcpPeeringGatewaySpec != nil { out.Region = gateway.Spec.Config.NetworkingV1GcpPeeringGatewaySpec.GetRegion() } - if gatewayType == gcpEgressPrivateServiceConnect { + if gatewayType == gcpEgressPrivateLink { out.Region = gateway.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } - if gatewayType == gcpIngressPrivateServiceConnect { + if gatewayType == gcpIngressPrivateLink { out.Region = gateway.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() } @@ -155,9 +155,9 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { out.AzurePrivateLinkServiceResourceId = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceResourceId() } case pcloud.Gcp: - if gatewayType == gcpEgressPrivateServiceConnect { + if gatewayType == gcpEgressPrivateLink { out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() - } else if gatewayType == gcpIngressPrivateServiceConnect { + } else if gatewayType == gcpIngressPrivateLink { out.GcpPrivateServiceConnectServiceAttachment = gateway.Status.CloudGateway.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus.GetPrivateServiceConnectServiceAttachment() } else if gatewayType == gcpPeering { out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() diff --git a/test/fixtures/output/network/gateway/create-gcp-ingress.golden b/test/fixtures/output/network/gateway/create-gcp-ingress.golden index c1a4bc3883..842cc02120 100644 --- a/test/fixtures/output/network/gateway/create-gcp-ingress.golden +++ b/test/fixtures/output/network/gateway/create-gcp-ingress.golden @@ -4,7 +4,7 @@ warning: GOCOVERDIR not set, no coverage data emitted | Name | my-gcp-ingress-gateway | | Environment | env-596 | | Region | us-central1 | -| Type | GcpIngressPrivateServiceConnect | +| Type | GcpIngressPrivateLink | | GCP PSC Service Attachment | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | | Phase | READY | +----------------------------+-----------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden index a8a8e113c7..0cd09140b4 100644 --- a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden @@ -4,7 +4,7 @@ warning: GOCOVERDIR not set, no coverage data emitted | Name | my-gcp-ingress-gateway | | Environment | env-596 | | Region | us-central1 | -| Type | GcpIngressPrivateServiceConnect | +| Type | GcpIngressPrivateLink | | GCP PSC Service Attachment | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | | Phase | READY | +----------------------------+-----------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/describe-gcp.golden b/test/fixtures/output/network/gateway/describe-gcp.golden index 4e0fceda67..205b864eb3 100644 --- a/test/fixtures/output/network/gateway/describe-gcp.golden +++ b/test/fixtures/output/network/gateway/describe-gcp.golden @@ -1,10 +1,10 @@ warning: GOCOVERDIR not set, no coverage data emitted -+-------------+--------------------------------+ -| ID | gw-07531 | -| Name | my-gcp-gateway | -| Environment | env-596 | -| Region | eastus | -| Type | GcpEgressPrivateServiceConnect | -| GCP Project | project-12345 | -| Phase | READY | -+-------------+--------------------------------+ ++-------------+----------------------+ +| ID | gw-07531 | +| Name | my-gcp-gateway | +| Environment | env-596 | +| Region | eastus | +| Type | GcpEgressPrivateLink | +| GCP Project | project-12345 | +| Phase | READY | ++-------------+----------------------+ diff --git a/test/fixtures/output/network/gateway/list-filter-id.golden b/test/fixtures/output/network/gateway/list-filter-id.golden index 0e62e18fae..8d74d48ae9 100644 --- a/test/fixtures/output/network/gateway/list-filter-id.golden +++ b/test/fixtures/output/network/gateway/list-filter-id.golden @@ -1,2 +1,5 @@ warning: GOCOVERDIR not set, no coverage data emitted -None found. + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-multiple.golden b/test/fixtures/output/network/gateway/list-filter-multiple.golden index 0e62e18fae..8d74d48ae9 100644 --- a/test/fixtures/output/network/gateway/list-filter-multiple.golden +++ b/test/fixtures/output/network/gateway/list-filter-multiple.golden @@ -1,2 +1,5 @@ warning: GOCOVERDIR not set, no coverage data emitted -None found. + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-name.golden b/test/fixtures/output/network/gateway/list-filter-name.golden index 0e62e18fae..b7b6962b49 100644 --- a/test/fixtures/output/network/gateway/list-filter-name.golden +++ b/test/fixtures/output/network/gateway/list-filter-name.golden @@ -1,2 +1,6 @@ warning: GOCOVERDIR not set, no coverage data emitted -None found. + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+------------------------+--------------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | diff --git a/test/fixtures/output/network/gateway/list-filter-phase.golden b/test/fixtures/output/network/gateway/list-filter-phase.golden index 0e62e18fae..bcda3bdb59 100644 --- a/test/fixtures/output/network/gateway/list-filter-phase.golden +++ b/test/fixtures/output/network/gateway/list-filter-phase.golden @@ -1,2 +1,14 @@ warning: GOCOVERDIR not set, no coverage data emitted -None found. + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+-------------+----------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- + gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateLink | | | | | | | project-12345 | | READY | | | + gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | + gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | + gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateLink | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-region.golden b/test/fixtures/output/network/gateway/list-filter-region.golden index 0e62e18fae..8d74d48ae9 100644 --- a/test/fixtures/output/network/gateway/list-filter-region.golden +++ b/test/fixtures/output/network/gateway/list-filter-region.golden @@ -1,2 +1,5 @@ warning: GOCOVERDIR not set, no coverage data emitted -None found. + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-type.golden b/test/fixtures/output/network/gateway/list-filter-type.golden index 0e62e18fae..8d74d48ae9 100644 --- a/test/fixtures/output/network/gateway/list-filter-type.golden +++ b/test/fixtures/output/network/gateway/list-filter-type.golden @@ -1,2 +1,5 @@ warning: GOCOVERDIR not set, no coverage data emitted -None found. + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-json.golden b/test/fixtures/output/network/gateway/list-json.golden index ef00585a79..c95e2b6823 100644 --- a/test/fixtures/output/network/gateway/list-json.golden +++ b/test/fixtures/output/network/gateway/list-json.golden @@ -5,7 +5,7 @@ warning: GOCOVERDIR not set, no coverage data emitted "name": "my-gcp-gateway", "environment": "env-596", "region": "eastus", - "type": "GcpEgressPrivateServiceConnect", + "type": "GcpEgressPrivateLink", "gcp_project": "project-12345", "phase": "READY" }, @@ -86,7 +86,7 @@ warning: GOCOVERDIR not set, no coverage data emitted "name": "my-gcp-ingress-gateway", "environment": "env-596", "region": "us-central1", - "type": "GcpIngressPrivateServiceConnect", + "type": "GcpIngressPrivateLink", "gcp_private_service_connect_service_attachment": "projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment", "phase": "READY" } diff --git a/test/fixtures/output/network/gateway/list.golden b/test/fixtures/output/network/gateway/list.golden index 53f8f24792..bcda3bdb59 100644 --- a/test/fixtures/output/network/gateway/list.golden +++ b/test/fixtures/output/network/gateway/list.golden @@ -1,14 +1,14 @@ warning: GOCOVERDIR not set, no coverage data emitted - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- - gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | | | project-12345 | | READY | | | - gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | - gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | - gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | - gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | - gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | - gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | - gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+-------------+----------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- + gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateLink | | | | | | | project-12345 | | READY | | | + gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | + gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | + gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateLink | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index b623391120..05f9f7241f 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -2668,10 +2668,10 @@ func getGatewayTypeFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) str return "GcpPeering" } if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { - return "GcpEgressPrivateServiceConnect" + return "GcpEgressPrivateLink" } if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { - return "GcpIngressPrivateServiceConnect" + return "GcpIngressPrivateLink" } return "" } From f37e8837f90e93b342c2cd23d4b99ca2e6c11666 Mon Sep 17 00:00:00 2001 From: Andrew Veenstra Date: Fri, 3 Apr 2026 17:38:02 -0400 Subject: [PATCH 06/18] Accept gcp-*-privatelink as gateway type filter while keeping display names The API accepts GcpEgressPrivateLink/GcpIngressPrivateLink for type filtering, but the CLI only accepted gcp-*-private-service-connect. Now accepts both gcp-*-privatelink and gcp-*-private-service-connect as filter input, while keeping GcpEgressPrivateServiceConnect and GcpIngressPrivateServiceConnect as the displayed type names. Co-Authored-By: Claude Opus 4.6 --- internal/network/command_gateway.go | 24 ++++++++--------- internal/network/command_gateway_list.go | 8 +++--- .../network/gateway/create-gcp-ingress.golden | 2 +- .../gateway/describe-gcp-ingress.golden | 2 +- .../network/gateway/describe-gcp.golden | 18 ++++++------- .../network/gateway/list-filter-phase.golden | 26 +++++++++---------- .../output/network/gateway/list-json.golden | 4 +-- .../output/network/gateway/list.golden | 26 +++++++++---------- test/test-server/networking_handlers.go | 4 +-- 9 files changed, 57 insertions(+), 57 deletions(-) diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index a5fed1448d..e743b37728 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -24,8 +24,8 @@ const ( azurePeering = "AzurePeering" awsPrivateNetworkInterface = "AwsPrivateNetworkInterface" gcpPeering = "GcpPeering" - gcpEgressPrivateLink = "GcpEgressPrivateLink" - gcpIngressPrivateLink = "GcpIngressPrivateLink" + gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" + gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" azureIngressPrivateLink = "AzureIngressPrivateLink" ) @@ -37,10 +37,10 @@ var ( "aws-ingress-privatelink": awsIngressPrivateLink, "azure-egress-privatelink": azureEgressPrivateLink, "azure-ingress-privatelink": azureIngressPrivateLink, - "gcp-egress-privatelink": gcpEgressPrivateLink, - "gcp-ingress-privatelink": gcpIngressPrivateLink, - "gcp-egress-private-service-connect": gcpEgressPrivateLink, - "gcp-ingress-private-service-connect": gcpIngressPrivateLink, + "gcp-egress-privatelink": "GcpEgressPrivateLink", + "gcp-ingress-privatelink": "GcpIngressPrivateLink", + "gcp-egress-private-service-connect": "GcpEgressPrivateLink", + "gcp-ingress-private-service-connect": "GcpIngressPrivateLink", } ) @@ -201,11 +201,11 @@ func getGatewayType(gateway networkinggatewayv1.NetworkingV1Gateway) (string, er } if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { - return gcpEgressPrivateLink, nil + return gcpEgressPrivateServiceConnect, nil } if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { - return gcpIngressPrivateLink, nil + return gcpIngressPrivateServiceConnect, nil } return "", fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "config") @@ -255,10 +255,10 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin out.Region = gateway.Spec.Config.NetworkingV1AwsPrivateNetworkInterfaceGatewaySpec.GetRegion() out.Zones = gateway.Spec.Config.NetworkingV1AwsPrivateNetworkInterfaceGatewaySpec.GetZones() } - if gatewayType == gcpEgressPrivateLink { + if gatewayType == gcpEgressPrivateServiceConnect { out.Region = gateway.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } - if gatewayType == gcpIngressPrivateLink { + if gatewayType == gcpIngressPrivateServiceConnect { out.Region = gateway.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() } if gatewayType == gcpPeering { @@ -282,9 +282,9 @@ func printGatewayTable(cmd *cobra.Command, gateway networkinggatewayv1.Networkin out.AzurePrivateLinkServiceResourceId = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceResourceId() } case pcloud.Gcp: - if gatewayType == gcpEgressPrivateLink { + if gatewayType == gcpEgressPrivateServiceConnect { out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() - } else if gatewayType == gcpIngressPrivateLink { + } else if gatewayType == gcpIngressPrivateServiceConnect { out.GcpPrivateServiceConnectServiceAttachment = gateway.Status.CloudGateway.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus.GetPrivateServiceConnectServiceAttachment() } else if gatewayType == gcpPeering { out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() diff --git a/internal/network/command_gateway_list.go b/internal/network/command_gateway_list.go index 1de2803dda..92b31efaf4 100644 --- a/internal/network/command_gateway_list.go +++ b/internal/network/command_gateway_list.go @@ -131,10 +131,10 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { if gateway.Spec.Config != nil && gateway.Spec.Config.NetworkingV1GcpPeeringGatewaySpec != nil { out.Region = gateway.Spec.Config.NetworkingV1GcpPeeringGatewaySpec.GetRegion() } - if gatewayType == gcpEgressPrivateLink { + if gatewayType == gcpEgressPrivateServiceConnect { out.Region = gateway.Spec.Config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec.GetRegion() } - if gatewayType == gcpIngressPrivateLink { + if gatewayType == gcpIngressPrivateServiceConnect { out.Region = gateway.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec.GetRegion() } @@ -155,9 +155,9 @@ func (c *command) gatewayList(cmd *cobra.Command, _ []string) error { out.AzurePrivateLinkServiceResourceId = gateway.Status.CloudGateway.NetworkingV1AzureIngressPrivateLinkGatewayStatus.GetPrivateLinkServiceResourceId() } case pcloud.Gcp: - if gatewayType == gcpEgressPrivateLink { + if gatewayType == gcpEgressPrivateServiceConnect { out.GcpProject = gateway.Status.CloudGateway.NetworkingV1GcpEgressPrivateServiceConnectGatewayStatus.GetProject() - } else if gatewayType == gcpIngressPrivateLink { + } else if gatewayType == gcpIngressPrivateServiceConnect { out.GcpPrivateServiceConnectServiceAttachment = gateway.Status.CloudGateway.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus.GetPrivateServiceConnectServiceAttachment() } else if gatewayType == gcpPeering { out.GcpIamPrincipal = gateway.Status.CloudGateway.NetworkingV1GcpPeeringGatewayStatus.GetIamPrincipal() diff --git a/test/fixtures/output/network/gateway/create-gcp-ingress.golden b/test/fixtures/output/network/gateway/create-gcp-ingress.golden index 842cc02120..c1a4bc3883 100644 --- a/test/fixtures/output/network/gateway/create-gcp-ingress.golden +++ b/test/fixtures/output/network/gateway/create-gcp-ingress.golden @@ -4,7 +4,7 @@ warning: GOCOVERDIR not set, no coverage data emitted | Name | my-gcp-ingress-gateway | | Environment | env-596 | | Region | us-central1 | -| Type | GcpIngressPrivateLink | +| Type | GcpIngressPrivateServiceConnect | | GCP PSC Service Attachment | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | | Phase | READY | +----------------------------+-----------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden index 0cd09140b4..a8a8e113c7 100644 --- a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden @@ -4,7 +4,7 @@ warning: GOCOVERDIR not set, no coverage data emitted | Name | my-gcp-ingress-gateway | | Environment | env-596 | | Region | us-central1 | -| Type | GcpIngressPrivateLink | +| Type | GcpIngressPrivateServiceConnect | | GCP PSC Service Attachment | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | | Phase | READY | +----------------------------+-----------------------------------------------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/describe-gcp.golden b/test/fixtures/output/network/gateway/describe-gcp.golden index 205b864eb3..4e0fceda67 100644 --- a/test/fixtures/output/network/gateway/describe-gcp.golden +++ b/test/fixtures/output/network/gateway/describe-gcp.golden @@ -1,10 +1,10 @@ warning: GOCOVERDIR not set, no coverage data emitted -+-------------+----------------------+ -| ID | gw-07531 | -| Name | my-gcp-gateway | -| Environment | env-596 | -| Region | eastus | -| Type | GcpEgressPrivateLink | -| GCP Project | project-12345 | -| Phase | READY | -+-------------+----------------------+ ++-------------+--------------------------------+ +| ID | gw-07531 | +| Name | my-gcp-gateway | +| Environment | env-596 | +| Region | eastus | +| Type | GcpEgressPrivateServiceConnect | +| GCP Project | project-12345 | +| Phase | READY | ++-------------+--------------------------------+ diff --git a/test/fixtures/output/network/gateway/list-filter-phase.golden b/test/fixtures/output/network/gateway/list-filter-phase.golden index bcda3bdb59..53f8f24792 100644 --- a/test/fixtures/output/network/gateway/list-filter-phase.golden +++ b/test/fixtures/output/network/gateway/list-filter-phase.golden @@ -1,14 +1,14 @@ warning: GOCOVERDIR not set, no coverage data emitted - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+--------------------------+-------------+-------------+----------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- - gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateLink | | | | | | | project-12345 | | READY | | | - gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | - gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | - gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | - gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | - gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | - gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | - gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateLink | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- + gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | | | project-12345 | | READY | | | + gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | + gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | + gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/fixtures/output/network/gateway/list-json.golden b/test/fixtures/output/network/gateway/list-json.golden index c95e2b6823..ef00585a79 100644 --- a/test/fixtures/output/network/gateway/list-json.golden +++ b/test/fixtures/output/network/gateway/list-json.golden @@ -5,7 +5,7 @@ warning: GOCOVERDIR not set, no coverage data emitted "name": "my-gcp-gateway", "environment": "env-596", "region": "eastus", - "type": "GcpEgressPrivateLink", + "type": "GcpEgressPrivateServiceConnect", "gcp_project": "project-12345", "phase": "READY" }, @@ -86,7 +86,7 @@ warning: GOCOVERDIR not set, no coverage data emitted "name": "my-gcp-ingress-gateway", "environment": "env-596", "region": "us-central1", - "type": "GcpIngressPrivateLink", + "type": "GcpIngressPrivateServiceConnect", "gcp_private_service_connect_service_attachment": "projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment", "phase": "READY" } diff --git a/test/fixtures/output/network/gateway/list.golden b/test/fixtures/output/network/gateway/list.golden index bcda3bdb59..53f8f24792 100644 --- a/test/fixtures/output/network/gateway/list.golden +++ b/test/fixtures/output/network/gateway/list.golden @@ -1,14 +1,14 @@ warning: GOCOVERDIR not set, no coverage data emitted - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+--------------------------+-------------+-------------+----------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- - gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateLink | | | | | | | project-12345 | | READY | | | - gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | - gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | - gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | - gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | - gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | - gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | - gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateLink | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- + gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | | | project-12345 | | READY | | | + gw-09876 | my-azure-peering-gateway | env-596 | eastus2 | AzurePeering | | | | | | | | | READY | | | + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-13570 | my-gcp-peering-gateway | env-596 | eastus2 | GcpPeering | | | | | | g000000-a000-0a00-00aa-0000aaa0a0a0 | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + gw-54321 | my-aws-peering-gateway | env-596 | us-east-2 | AwsPeering | | | | | | | | | READY | | | + gw-67890 | my-azure-gateway | env-596 | eastus | AzureEgressPrivateLink | | | aa000000-a000-0a00-00aa-0000aaa0a0a0 | | | | | | READY | | | + gw-88888 | my-aws-ingress-gateway | env-596 | us-west-2 | AwsIngressPrivateLink | | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | | READY | | | + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index 05f9f7241f..b623391120 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -2668,10 +2668,10 @@ func getGatewayTypeFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) str return "GcpPeering" } if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { - return "GcpEgressPrivateLink" + return "GcpEgressPrivateServiceConnect" } if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { - return "GcpIngressPrivateLink" + return "GcpIngressPrivateServiceConnect" } return "" } From ddd2d41b573a90ed029eb0ab3274f88eb72a9366 Mon Sep 17 00:00:00 2001 From: Andrew Veenstra Date: Thu, 16 Apr 2026 18:04:25 -0400 Subject: [PATCH 07/18] Address PR review feedback from Steven Gagniere Use go.mod replace directives for internal SDK instead of changing all import paths, remove unnecessary HasDnsDomain guards, and strip GOCOVERDIR warnings from golden files. Co-Authored-By: Claude Opus 4.6 --- go.mod | 9 +++++++-- ...nd_access_point_private_link_egress_endpoint.go | 2 +- ...ss_point_private_link_egress_endpoint_create.go | 2 +- ...ss_point_private_link_egress_endpoint_update.go | 2 +- ...d_access_point_private_link_ingress_endpoint.go | 14 ++++---------- ...s_point_private_link_ingress_endpoint_create.go | 2 +- ...s_point_private_link_ingress_endpoint_update.go | 2 +- ...mmand_access_point_private_network_interface.go | 2 +- ...ccess_point_private_network_interface_create.go | 2 +- ...ccess_point_private_network_interface_update.go | 2 +- internal/network/command_dns_record.go | 2 +- internal/network/command_dns_record_create.go | 2 +- internal/network/command_dns_record_update.go | 2 +- internal/network/command_gateway.go | 2 +- internal/network/command_gateway_create.go | 2 +- internal/network/command_gateway_update.go | 2 +- pkg/ccloudv2/client.go | 4 ++-- pkg/ccloudv2/networking-gateway.go | 2 +- pkg/ccloudv2/networking_access_point.go | 2 +- .../ingress-endpoint/create-aws-name.golden | 1 - .../ingress-endpoint/create-aws.golden | 1 - .../ingress-endpoint/create-azure.golden | 1 - .../ingress-endpoint/create-gcp.golden | 1 - .../ingress-endpoint/delete-autocomplete.golden | 1 - .../ingress-endpoint/delete-fail.golden | 1 - .../ingress-endpoint/delete-multiple.golden | 1 - .../private-link/ingress-endpoint/delete.golden | 1 - .../ingress-endpoint/describe-autocomplete.golden | 1 - .../ingress-endpoint/describe-aws-json.golden | 1 - .../ingress-endpoint/describe-aws.golden | 1 - .../ingress-endpoint/describe-azure-json.golden | 1 - .../ingress-endpoint/describe-azure.golden | 1 - .../ingress-endpoint/describe-gcp-json.golden | 1 - .../ingress-endpoint/describe-gcp.golden | 1 - .../private-link/ingress-endpoint/list-json.golden | 1 - .../private-link/ingress-endpoint/list.golden | 1 - .../ingress-endpoint/update-autocomplete.golden | 1 - .../ingress-endpoint/update-aws.golden | 1 - .../ingress-endpoint/update-azure.golden | 1 - .../ingress-endpoint/update-gcp.golden | 1 - .../network/gateway/create-aws-ingress.golden | 1 - .../create-aws-private-network-interface.golden | 1 - .../output/network/gateway/create-aws.golden | 1 - .../network/gateway/create-azure-ingress.golden | 1 - .../network/gateway/create-gcp-ingress.golden | 1 - .../gateway/create-type-autocomplete.golden | 1 - .../gateway/delete-azure-ingress-multiple.golden | 1 - .../network/gateway/delete-azure-ingress.golden | 1 - .../output/network/gateway/delete-fail.golden | 1 - .../output/network/gateway/delete-multiple.golden | 1 - test/fixtures/output/network/gateway/delete.golden | 1 - .../network/gateway/describe-autocomplete.golden | 1 - .../gateway/describe-aws-ingress-json.golden | 1 - .../network/gateway/describe-aws-ingress.golden | 1 - .../network/gateway/describe-aws-json.golden | 1 - .../describe-aws-private-network-interface.golden | 1 - .../output/network/gateway/describe-aws.golden | 1 - .../network/gateway/describe-azure-ingress.golden | 1 - .../output/network/gateway/describe-azure.golden | 1 - .../gateway/describe-gcp-dns-peering.golden | 1 - .../network/gateway/describe-gcp-ingress.golden | 1 - .../output/network/gateway/describe-gcp.golden | 1 - .../output/network/gateway/list-filter-id.golden | 1 - .../network/gateway/list-filter-multiple.golden | 1 - .../output/network/gateway/list-filter-name.golden | 1 - .../network/gateway/list-filter-phase.golden | 1 - .../network/gateway/list-filter-region.golden | 1 - .../output/network/gateway/list-filter-type.golden | 1 - .../output/network/gateway/list-json.golden | 1 - test/fixtures/output/network/gateway/list.golden | 1 - test/fixtures/output/network/gateway/update.golden | 1 - test/test-server/networking_handlers.go | 4 ++-- 72 files changed, 31 insertions(+), 84 deletions(-) diff --git a/go.mod b/go.mod index 7ed8f81a73..93fd918970 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,6 @@ require ( github.com/charmbracelet/lipgloss v0.11.0 github.com/client9/gospell v0.0.0-20160306015952-90dfc71015df github.com/confluentinc/ccloud-sdk-go-v1-public v0.0.0-20250521223017-0e8f6f971b52 - github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.13.0 - github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.13.0 github.com/confluentinc/ccloud-sdk-go-v2/ai v0.1.0 github.com/confluentinc/ccloud-sdk-go-v2/apikeys v0.4.0 github.com/confluentinc/ccloud-sdk-go-v2/billing v0.3.0 @@ -42,7 +40,9 @@ require ( github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0 github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0 + github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.8.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0 + github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.5.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0 github.com/confluentinc/ccloud-sdk-go-v2/org v0.9.0 @@ -288,3 +288,8 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace ( + github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point => github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.13.0 + github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway => github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.13.0 +) diff --git a/internal/network/command_access_point_private_link_egress_endpoint.go b/internal/network/command_access_point_private_link_egress_endpoint.go index 419c3581b1..3b7a1eb855 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint.go +++ b/internal/network/command_access_point_private_link_egress_endpoint.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/errors" "github.com/confluentinc/cli/v4/pkg/output" diff --git a/internal/network/command_access_point_private_link_egress_endpoint_create.go b/internal/network/command_access_point_private_link_egress_endpoint_create.go index 25fb44ae55..f4d55f47bc 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_create.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_access_point_private_link_egress_endpoint_update.go b/internal/network/command_access_point_private_link_egress_endpoint_update.go index b8ea9bdec2..f6608b548b 100644 --- a/internal/network/command_access_point_private_link_egress_endpoint_update.go +++ b/internal/network/command_access_point_private_link_egress_endpoint_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_access_point_private_link_ingress_endpoint.go b/internal/network/command_access_point_private_link_ingress_endpoint.go index 62eefd475f..5cdc8bc83c 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/config" "github.com/confluentinc/cli/v4/pkg/errors" @@ -104,26 +104,20 @@ func printPrivateLinkIngressEndpointTable(cmd *cobra.Command, ingressEndpoint ne if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus != nil { out.AwsVpcEndpointId = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetVpcEndpointId() out.AwsVpcEndpointServiceName = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetVpcEndpointServiceName() - if ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.HasDnsDomain() { - out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetDnsDomain() - } + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetDnsDomain() } if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus != nil { out.AzurePrivateLinkServiceAlias = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateLinkServiceAlias() out.AzurePrivateLinkServiceResourceId = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateLinkServiceResourceId() out.AzurePrivateEndpointResourceId = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetPrivateEndpointResourceId() - if ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.HasDnsDomain() { - out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetDnsDomain() - } + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AzureIngressPrivateLinkEndpointStatus.GetDnsDomain() } if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() - if ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.HasDnsDomain() { - out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetDnsDomain() - } + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetDnsDomain() } table := output.NewTable(cmd) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 9dab7c5741..2bce1914d8 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_update.go b/internal/network/command_access_point_private_link_ingress_endpoint_update.go index d52e2775a5..21286494c3 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_update.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_access_point_private_network_interface.go b/internal/network/command_access_point_private_network_interface.go index 6e16483d26..90f2a81369 100644 --- a/internal/network/command_access_point_private_network_interface.go +++ b/internal/network/command_access_point_private_network_interface.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/errors" "github.com/confluentinc/cli/v4/pkg/output" diff --git a/internal/network/command_access_point_private_network_interface_create.go b/internal/network/command_access_point_private_network_interface_create.go index 2f5f2b596e..56881f78f3 100644 --- a/internal/network/command_access_point_private_network_interface_create.go +++ b/internal/network/command_access_point_private_network_interface_create.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_access_point_private_network_interface_update.go b/internal/network/command_access_point_private_network_interface_update.go index 30aad2c068..892299bb68 100644 --- a/internal/network/command_access_point_private_network_interface_update.go +++ b/internal/network/command_access_point_private_network_interface_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_dns_record.go b/internal/network/command_dns_record.go index 2823862de3..bd363d134a 100644 --- a/internal/network/command_dns_record.go +++ b/internal/network/command_dns_record.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/ccloudv2" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_dns_record_create.go b/internal/network/command_dns_record_create.go index 6ab008d801..c3013ca857 100644 --- a/internal/network/command_dns_record_create.go +++ b/internal/network/command_dns_record_create.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_dns_record_update.go b/internal/network/command_dns_record_update.go index 77dc64f969..a29fcf077e 100644 --- a/internal/network/command_dns_record_update.go +++ b/internal/network/command_dns_record_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index e743b37728..f3a585dea6 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" "github.com/confluentinc/cli/v4/pkg/ccloudv2" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" diff --git a/internal/network/command_gateway_create.go b/internal/network/command_gateway_create.go index 7faa89a3f1..d6e9242d59 100644 --- a/internal/network/command_gateway_create.go +++ b/internal/network/command_gateway_create.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" pcloud "github.com/confluentinc/cli/v4/pkg/cloud" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" diff --git a/internal/network/command_gateway_update.go b/internal/network/command_gateway_update.go index 603028b10c..084704c28b 100644 --- a/internal/network/command_gateway_update.go +++ b/internal/network/command_gateway_update.go @@ -3,7 +3,7 @@ package network import ( "github.com/spf13/cobra" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" pcmd "github.com/confluentinc/cli/v4/pkg/cmd" "github.com/confluentinc/cli/v4/pkg/examples" diff --git a/pkg/ccloudv2/client.go b/pkg/ccloudv2/client.go index fd0acc11eb..6f5f1d47b9 100644 --- a/pkg/ccloudv2/client.go +++ b/pkg/ccloudv2/client.go @@ -22,9 +22,9 @@ import ( kafkaquotasv1 "github.com/confluentinc/ccloud-sdk-go-v2/kafka-quotas/v1" ksqlv2 "github.com/confluentinc/ccloud-sdk-go-v2/ksql/v2" mdsv2 "github.com/confluentinc/ccloud-sdk-go-v2/mds/v2" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" networkingipv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-ip/v1" networkingprivatelinkv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink/v1" networkingv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking/v1" diff --git a/pkg/ccloudv2/networking-gateway.go b/pkg/ccloudv2/networking-gateway.go index 607ba5a7ce..5cb739e9bb 100644 --- a/pkg/ccloudv2/networking-gateway.go +++ b/pkg/ccloudv2/networking-gateway.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" "github.com/confluentinc/cli/v4/pkg/errors" ) diff --git a/pkg/ccloudv2/networking_access_point.go b/pkg/ccloudv2/networking_access_point.go index 8df52b0e65..8ad2db50a4 100644 --- a/pkg/ccloudv2/networking_access_point.go +++ b/pkg/ccloudv2/networking_access_point.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" "github.com/confluentinc/cli/v4/pkg/errors" ) diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden index 527f8d985f..2e076e4d05 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------------------+---------------------------------------------------------+ | ID | ap-99999 | | Name | my-ingress-endpoint | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden index 6ea455b0b1..8de2886b3f 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------------------+---------------------------------------------------------+ | ID | ap-99999 | | Environment | env-596 | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden index 2e6c31502f..af064c720f 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | ID | ap-11111 | | Environment | env-596 | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden index d6cf36a639..8756fa5649 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------+-----------------------------------------------------------------------------------+ | ID | ap-22222 | | Environment | env-596 | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden index 608515e2f6..90a0a467af 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ap-99999 my-aws-ingress-access-point ap-11111 my-azure-ingress-access-point ap-22222 my-gcp-ingress-access-point diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden index a7dd241aa8..0bca0ce739 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted Error: access point "ap-invalid" not found Suggestions: diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden index 285ed28c06..185f5c9d80 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden @@ -1,2 +1 @@ -warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete access points "ap-99999" and "ap-88888"? (y/n): Requested to delete access points "ap-99999" and "ap-88888". diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden index d51fe2cbec..965205b41c 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden @@ -1,2 +1 @@ -warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete access point "ap-88888"? (y/n): Requested to delete access point "ap-88888". diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden index 608515e2f6..90a0a467af 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ap-99999 my-aws-ingress-access-point ap-11111 my-azure-ingress-access-point ap-22222 my-gcp-ingress-access-point diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden index e0cabd76cf..8745067043 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted { "id": "ap-99999", "name": "my-aws-ingress-access-point", diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden index 8868cdc88b..31fe1d3c41 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------------------+---------------------------------------------------------+ | ID | ap-99999 | | Name | my-aws-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden index 2f6d0e7bd5..0a3e2bf224 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted { "id": "ap-11111", "name": "my-azure-ingress-access-point", diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden index bc2056b0f7..ba57cc6702 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | ID | ap-11111 | | Name | my-azure-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden index 1733c1eef5..694084713d 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted { "id": "ap-22222", "name": "my-gcp-ingress-access-point", diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden index 099da834dc..a60be4a7e5 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------+-----------------------------------------------------------------------------------+ | ID | ap-22222 | | Name | my-gcp-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden index 62a886f84c..dcbe54bb35 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted [ { "id": "ap-11111", diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden index 9fc1d6aa7b..00e1110364 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Gateway | Phase | AWS VPC Endpoint ID | AWS VPC Endpoint Service Name | Azure Private Link Service | Azure Private Link Service | Azure Private Endpoint | GCP PSC Service Attachment | GCP PSC Connection ID | DNS Domain | | | | | | | Alias | Resource ID | Resource ID | | | -----------+-------------------------------+-------------+----------+-------+------------------------+---------------------------------------------------------+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------------------+------------------------------------------------------ diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden index 69c79c5b8b..0c9b04f382 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted --name Name of the ingress endpoint. ap-99999 my-aws-ingress-access-point ap-11111 my-azure-ingress-access-point diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden index 1829980547..b4c5eaa74b 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------+---------------------------------+ | ID | ap-88888 | | Name | my-new-aws-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden index ac98e10421..8414d4ebe2 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | ID | ap-11111 | | Name | my-new-azure-ingress-access-point | diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden index 68d0d3054b..ccdf1e1542 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------+-----------------------------------------------------------------------------------+ | ID | ap-22222 | | Name | my-new-gcp-ingress-access-point | diff --git a/test/fixtures/output/network/gateway/create-aws-ingress.golden b/test/fixtures/output/network/gateway/create-aws-ingress.golden index c296445689..49f2ea734d 100644 --- a/test/fixtures/output/network/gateway/create-aws-ingress.golden +++ b/test/fixtures/output/network/gateway/create-aws-ingress.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +---------------------------+---------------------------------------------------------+ | ID | gw-abc123 | | Name | my-gateway | diff --git a/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden b/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden index 81f0607185..3f3ce1194a 100644 --- a/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden +++ b/test/fixtures/output/network/gateway/create-aws-private-network-interface.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------+----------------------------+ | ID | gw-abc123 | | Name | my-gateway | diff --git a/test/fixtures/output/network/gateway/create-aws.golden b/test/fixtures/output/network/gateway/create-aws.golden index 6ce64c73c9..45a5891b6d 100644 --- a/test/fixtures/output/network/gateway/create-aws.golden +++ b/test/fixtures/output/network/gateway/create-aws.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------+--------------------------------+ | ID | gw-abc123 | | Name | my-gateway | diff --git a/test/fixtures/output/network/gateway/create-azure-ingress.golden b/test/fixtures/output/network/gateway/create-azure-ingress.golden index 4aea3a2201..4d1f31346b 100644 --- a/test/fixtures/output/network/gateway/create-azure-ingress.golden +++ b/test/fixtures/output/network/gateway/create-azure-ingress.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | ID | gw-abc123 | | Name | my-azure-ingress-gateway | diff --git a/test/fixtures/output/network/gateway/create-gcp-ingress.golden b/test/fixtures/output/network/gateway/create-gcp-ingress.golden index c1a4bc3883..51c91c6483 100644 --- a/test/fixtures/output/network/gateway/create-gcp-ingress.golden +++ b/test/fixtures/output/network/gateway/create-gcp-ingress.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------+-----------------------------------------------------------------------------------------------+ | ID | gw-abc123 | | Name | my-gcp-ingress-gateway | diff --git a/test/fixtures/output/network/gateway/create-type-autocomplete.golden b/test/fixtures/output/network/gateway/create-type-autocomplete.golden index fa5f35a9fe..2abd4cc770 100644 --- a/test/fixtures/output/network/gateway/create-type-autocomplete.golden +++ b/test/fixtures/output/network/gateway/create-type-autocomplete.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted egress-privatelink ingress-privatelink private-network-interface diff --git a/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden b/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden index d746c8371a..48b9e4b87f 100644 --- a/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden +++ b/test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden @@ -1,2 +1 @@ -warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete gateways "gw-11111" and "gw-67890"? (y/n): Requested to delete gateways "gw-11111" and "gw-67890". diff --git a/test/fixtures/output/network/gateway/delete-azure-ingress.golden b/test/fixtures/output/network/gateway/delete-azure-ingress.golden index 4cf9d835d7..1ded158ff1 100644 --- a/test/fixtures/output/network/gateway/delete-azure-ingress.golden +++ b/test/fixtures/output/network/gateway/delete-azure-ingress.golden @@ -1,2 +1 @@ -warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete gateway "gw-11111"? (y/n): Requested to delete gateway "gw-11111". diff --git a/test/fixtures/output/network/gateway/delete-fail.golden b/test/fixtures/output/network/gateway/delete-fail.golden index 24dff5028f..ddacadb265 100644 --- a/test/fixtures/output/network/gateway/delete-fail.golden +++ b/test/fixtures/output/network/gateway/delete-fail.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted Error: gateway "gw-invalid" not found Suggestions: diff --git a/test/fixtures/output/network/gateway/delete-multiple.golden b/test/fixtures/output/network/gateway/delete-multiple.golden index c4deeeda37..b10c409d4c 100644 --- a/test/fixtures/output/network/gateway/delete-multiple.golden +++ b/test/fixtures/output/network/gateway/delete-multiple.golden @@ -1,2 +1 @@ -warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete gateways "gw-12345" and "gw-54321"? (y/n): Requested to delete gateways "gw-12345" and "gw-54321". diff --git a/test/fixtures/output/network/gateway/delete.golden b/test/fixtures/output/network/gateway/delete.golden index 96047a2e97..6fe2b00776 100644 --- a/test/fixtures/output/network/gateway/delete.golden +++ b/test/fixtures/output/network/gateway/delete.golden @@ -1,2 +1 @@ -warning: GOCOVERDIR not set, no coverage data emitted Are you sure you want to delete gateway "gw-12345"? (y/n): Requested to delete gateway "gw-12345". diff --git a/test/fixtures/output/network/gateway/describe-autocomplete.golden b/test/fixtures/output/network/gateway/describe-autocomplete.golden index c7734fcc9b..11b078da02 100644 --- a/test/fixtures/output/network/gateway/describe-autocomplete.golden +++ b/test/fixtures/output/network/gateway/describe-autocomplete.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted gw-12345 my-aws-gateway gw-54321 my-aws-peering-gateway gw-23456 my-aws-gateway diff --git a/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden b/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden index a87f154fbd..8d7759c35a 100644 --- a/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden +++ b/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted { "id": "gw-88888", "name": "my-aws-ingress-gateway", diff --git a/test/fixtures/output/network/gateway/describe-aws-ingress.golden b/test/fixtures/output/network/gateway/describe-aws-ingress.golden index e2f42445b0..f495e5598d 100644 --- a/test/fixtures/output/network/gateway/describe-aws-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-aws-ingress.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +---------------------------+---------------------------------------------------------+ | ID | gw-88888 | | Name | my-aws-ingress-gateway | diff --git a/test/fixtures/output/network/gateway/describe-aws-json.golden b/test/fixtures/output/network/gateway/describe-aws-json.golden index 05ebde5bfa..bd05e8b8c7 100644 --- a/test/fixtures/output/network/gateway/describe-aws-json.golden +++ b/test/fixtures/output/network/gateway/describe-aws-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted { "id": "gw-12345", "name": "my-aws-gateway", diff --git a/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden b/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden index 1e19ffb647..4e15e7c235 100644 --- a/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden +++ b/test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------+----------------------------+ | ID | gw-54321 | | Name | my-aws-gateway | diff --git a/test/fixtures/output/network/gateway/describe-aws.golden b/test/fixtures/output/network/gateway/describe-aws.golden index 183d3eb19c..6b5a24b4af 100644 --- a/test/fixtures/output/network/gateway/describe-aws.golden +++ b/test/fixtures/output/network/gateway/describe-aws.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------+--------------------------------+ | ID | gw-12345 | | Name | my-aws-gateway | diff --git a/test/fixtures/output/network/gateway/describe-azure-ingress.golden b/test/fixtures/output/network/gateway/describe-azure-ingress.golden index cfb5c6c926..f54fdb0961 100644 --- a/test/fixtures/output/network/gateway/describe-azure-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-azure-ingress.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +--------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ | ID | gw-11111 | | Name | my-azure-ingress-gateway | diff --git a/test/fixtures/output/network/gateway/describe-azure.golden b/test/fixtures/output/network/gateway/describe-azure.golden index 7e92ec4a67..f742ef8131 100644 --- a/test/fixtures/output/network/gateway/describe-azure.golden +++ b/test/fixtures/output/network/gateway/describe-azure.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +--------------------+--------------------------------------+ | ID | gw-67890 | | Name | my-azure-gateway | diff --git a/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden b/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden index 4ace464267..cb4b50d39a 100644 --- a/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden +++ b/test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------+-------------------------------------+ | ID | gw-13570 | | Name | my-gcp-gateway | diff --git a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden index a8a8e113c7..a721afd01f 100644 --- a/test/fixtures/output/network/gateway/describe-gcp-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-gcp-ingress.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +----------------------------+-----------------------------------------------------------------------------------------------+ | ID | gw-99999 | | Name | my-gcp-ingress-gateway | diff --git a/test/fixtures/output/network/gateway/describe-gcp.golden b/test/fixtures/output/network/gateway/describe-gcp.golden index 4e0fceda67..4a50deebbf 100644 --- a/test/fixtures/output/network/gateway/describe-gcp.golden +++ b/test/fixtures/output/network/gateway/describe-gcp.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------+--------------------------------+ | ID | gw-07531 | | Name | my-gcp-gateway | diff --git a/test/fixtures/output/network/gateway/list-filter-id.golden b/test/fixtures/output/network/gateway/list-filter-id.golden index 8d74d48ae9..fdf3ed3dda 100644 --- a/test/fixtures/output/network/gateway/list-filter-id.golden +++ b/test/fixtures/output/network/gateway/list-filter-id.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- diff --git a/test/fixtures/output/network/gateway/list-filter-multiple.golden b/test/fixtures/output/network/gateway/list-filter-multiple.golden index 8d74d48ae9..fdf3ed3dda 100644 --- a/test/fixtures/output/network/gateway/list-filter-multiple.golden +++ b/test/fixtures/output/network/gateway/list-filter-multiple.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- diff --git a/test/fixtures/output/network/gateway/list-filter-name.golden b/test/fixtures/output/network/gateway/list-filter-name.golden index b7b6962b49..811020907b 100644 --- a/test/fixtures/output/network/gateway/list-filter-name.golden +++ b/test/fixtures/output/network/gateway/list-filter-name.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+----------------+-------------+-----------+----------------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+------------------------+--------------+---------------- diff --git a/test/fixtures/output/network/gateway/list-filter-phase.golden b/test/fixtures/output/network/gateway/list-filter-phase.golden index 53f8f24792..121ebf0f93 100644 --- a/test/fixtures/output/network/gateway/list-filter-phase.golden +++ b/test/fixtures/output/network/gateway/list-filter-phase.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- diff --git a/test/fixtures/output/network/gateway/list-filter-region.golden b/test/fixtures/output/network/gateway/list-filter-region.golden index 8d74d48ae9..fdf3ed3dda 100644 --- a/test/fixtures/output/network/gateway/list-filter-region.golden +++ b/test/fixtures/output/network/gateway/list-filter-region.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- diff --git a/test/fixtures/output/network/gateway/list-filter-type.golden b/test/fixtures/output/network/gateway/list-filter-type.golden index 8d74d48ae9..fdf3ed3dda 100644 --- a/test/fixtures/output/network/gateway/list-filter-type.golden +++ b/test/fixtures/output/network/gateway/list-filter-type.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- diff --git a/test/fixtures/output/network/gateway/list-json.golden b/test/fixtures/output/network/gateway/list-json.golden index ef00585a79..29aaeb8b2e 100644 --- a/test/fixtures/output/network/gateway/list-json.golden +++ b/test/fixtures/output/network/gateway/list-json.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted [ { "id": "gw-07531", diff --git a/test/fixtures/output/network/gateway/list.golden b/test/fixtures/output/network/gateway/list.golden index 53f8f24792..121ebf0f93 100644 --- a/test/fixtures/output/network/gateway/list.golden +++ b/test/fixtures/output/network/gateway/list.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- diff --git a/test/fixtures/output/network/gateway/update.golden b/test/fixtures/output/network/gateway/update.golden index f4fb9c40a4..1eef138749 100644 --- a/test/fixtures/output/network/gateway/update.golden +++ b/test/fixtures/output/network/gateway/update.golden @@ -1,4 +1,3 @@ -warning: GOCOVERDIR not set, no coverage data emitted +-------------------+--------------------------------+ | ID | gw-111111 | | Name | new-name | diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index b623391120..ddac315aa2 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -12,9 +12,9 @@ import ( "github.com/gorilla/mux" "github.com/stretchr/testify/require" - networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point/v1" + networkingaccesspointv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point/v1" networkingdnsforwarderv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder/v1" - networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway/v1" + networkinggatewayv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway/v1" networkingipv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-ip/v1" networkingprivatelinkv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink/v1" networkingv1 "github.com/confluentinc/ccloud-sdk-go-v2/networking/v1" From 23cd708af82cc51b4b281668008ae7bc682cb0ad Mon Sep 17 00:00:00 2001 From: Andrew Veenstra Date: Fri, 17 Apr 2026 14:39:20 -0400 Subject: [PATCH 08/18] Fix gci struct alignment formatting Co-Authored-By: Claude Opus 4.6 --- ...ess_point_private_link_ingress_endpoint.go | 22 ++++----- internal/network/command_gateway.go | 46 +++++++++---------- test/test-server/networking_handlers.go | 8 ++-- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint.go b/internal/network/command_access_point_private_link_ingress_endpoint.go index 5cdc8bc83c..1f327377db 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint.go @@ -15,19 +15,19 @@ import ( ) type ingressEndpointOut struct { - Id string `human:"ID" serialized:"id"` - Name string `human:"Name,omitempty" serialized:"name,omitempty"` - Environment string `human:"Environment" serialized:"environment"` - Gateway string `human:"Gateway" serialized:"gateway"` - Phase string `human:"Phase" serialized:"phase"` - AwsVpcEndpointId string `human:"AWS VPC Endpoint ID,omitempty" serialized:"aws_vpc_endpoint_id,omitempty"` - AwsVpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` - AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` - AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Service Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` - AzurePrivateEndpointResourceId string `human:"Azure Private Endpoint Resource ID,omitempty" serialized:"azure_private_endpoint_resource_id,omitempty"` + Id string `human:"ID" serialized:"id"` + Name string `human:"Name,omitempty" serialized:"name,omitempty"` + Environment string `human:"Environment" serialized:"environment"` + Gateway string `human:"Gateway" serialized:"gateway"` + Phase string `human:"Phase" serialized:"phase"` + AwsVpcEndpointId string `human:"AWS VPC Endpoint ID,omitempty" serialized:"aws_vpc_endpoint_id,omitempty"` + AwsVpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` + AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` + AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Service Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` + AzurePrivateEndpointResourceId string `human:"Azure Private Endpoint Resource ID,omitempty" serialized:"azure_private_endpoint_resource_id,omitempty"` GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` GcpPrivateServiceConnectConnectionId string `human:"GCP PSC Connection ID,omitempty" serialized:"gcp_private_service_connect_connection_id,omitempty"` - DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` + DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` } func (c *accessPointCommand) newIngressEndpointCommand(cfg *config.Config) *cobra.Command { diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index f3a585dea6..6ac1f5b457 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -17,12 +17,12 @@ import ( ) const ( - awsEgressPrivateLink = "AwsEgressPrivateLink" - awsIngressPrivateLink = "AwsIngressPrivateLink" - awsPeering = "AwsPeering" - azureEgressPrivateLink = "AzureEgressPrivateLink" - azurePeering = "AzurePeering" - awsPrivateNetworkInterface = "AwsPrivateNetworkInterface" + awsEgressPrivateLink = "AwsEgressPrivateLink" + awsIngressPrivateLink = "AwsIngressPrivateLink" + awsPeering = "AwsPeering" + azureEgressPrivateLink = "AzureEgressPrivateLink" + azurePeering = "AzurePeering" + awsPrivateNetworkInterface = "AwsPrivateNetworkInterface" gcpPeering = "GcpPeering" gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" @@ -45,23 +45,23 @@ var ( ) type gatewayOut struct { - Id string `human:"ID" serialized:"id"` - Name string `human:"Name,omitempty" serialized:"name,omitempty"` - Environment string `human:"Environment" serialized:"environment"` - Region string `human:"Region,omitempty" serialized:"region,omitempty"` - Type string `human:"Type,omitempty" serialized:"type,omitempty"` - AwsPrincipalArn string `human:"AWS Principal ARN,omitempty" serialized:"aws_principal_arn,omitempty"` - VpcEndpointServiceName string `human:"VPC Endpoint Service Name,omitempty" serialized:"vpc_endpoint_service_name,omitempty"` - AzureSubscription string `human:"Azure Subscription,omitempty" serialized:"azure_subscription,omitempty"` - AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` - AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` - GcpIamPrincipal string `human:"GCP IAM Principal,omitempty" serialized:"gcp_iam_principal,omitempty"` - GcpProject string `human:"GCP Project,omitempty" serialized:"gcp_project,omitempty"` - GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` - Phase string `human:"Phase" serialized:"phase"` - Zones []string `human:"Zones,omitempty" serialized:"zones,omitempty"` - Account string `human:"Account,omitempty" serialized:"account,omitempty"` - ErrorMessage string `human:"Error Message,omitempty" serialized:"error_message,omitempty"` + Id string `human:"ID" serialized:"id"` + Name string `human:"Name,omitempty" serialized:"name,omitempty"` + Environment string `human:"Environment" serialized:"environment"` + Region string `human:"Region,omitempty" serialized:"region,omitempty"` + Type string `human:"Type,omitempty" serialized:"type,omitempty"` + AwsPrincipalArn string `human:"AWS Principal ARN,omitempty" serialized:"aws_principal_arn,omitempty"` + VpcEndpointServiceName string `human:"VPC Endpoint Service Name,omitempty" serialized:"vpc_endpoint_service_name,omitempty"` + AzureSubscription string `human:"Azure Subscription,omitempty" serialized:"azure_subscription,omitempty"` + AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` + AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` + GcpIamPrincipal string `human:"GCP IAM Principal,omitempty" serialized:"gcp_iam_principal,omitempty"` + GcpProject string `human:"GCP Project,omitempty" serialized:"gcp_project,omitempty"` + GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` + Phase string `human:"Phase" serialized:"phase"` + Zones []string `human:"Zones,omitempty" serialized:"zones,omitempty"` + Account string `human:"Account,omitempty" serialized:"account,omitempty"` + ErrorMessage string `human:"Error Message,omitempty" serialized:"error_message,omitempty"` } func (c *command) newGatewayCommand() *cobra.Command { diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index ddac315aa2..c8310ec98c 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -2437,7 +2437,7 @@ func getGateway(id, environment, name, specConfigKind, statusCloudGatewayKind st })) case "GcpIngressPrivateServiceConnectGatewayStatus": gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus{ - Kind: statusCloudGatewayKind, + Kind: statusCloudGatewayKind, PrivateServiceConnectServiceAttachment: networkinggatewayv1.PtrString("projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment"), })) case "GcpPeeringGatewayStatus": @@ -2550,7 +2550,7 @@ func handleNetworkingGatewayPost(t *testing.T) http.HandlerFunc { })) } else if body.Spec.Config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { gateway.Status.SetCloudGateway(networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatusAsNetworkingV1GatewayStatusCloudGatewayOneOf(&networkinggatewayv1.NetworkingV1GcpIngressPrivateServiceConnectGatewayStatus{ - Kind: "GcpIngressPrivateServiceConnectGatewayStatus", + Kind: "GcpIngressPrivateServiceConnectGatewayStatus", PrivateServiceConnectServiceAttachment: networkingv1.PtrString("projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment"), })) } else if body.Spec.Config.NetworkingV1GcpPeeringGatewaySpec != nil { @@ -3175,7 +3175,7 @@ func getAzureIngressAccessPoint(id, environment, name string) networkingaccesspo PrivateLinkServiceAlias: "azure-pls-alias.eastus.azure.privatelinkservice", PrivateLinkServiceResourceId: "/subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName", PrivateEndpointResourceId: "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", - DnsDomain: networkingaccesspointv1.PtrString("ap11111.eastus.azure.accesspoint.confluent.cloud"), + DnsDomain: networkingaccesspointv1.PtrString("ap11111.eastus.azure.accesspoint.confluent.cloud"), }, }, }, @@ -3369,7 +3369,7 @@ func handleNetworkingAccessPointCreate(t *testing.T) http.HandlerFunc { PrivateLinkServiceAlias: "azure-pls-alias.eastus.azure.privatelinkservice", PrivateLinkServiceResourceId: "/subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName", PrivateEndpointResourceId: "/subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", - DnsDomain: networkingaccesspointv1.PtrString("ap11111.eastus.azure.accesspoint.confluent.cloud"), + DnsDomain: networkingaccesspointv1.PtrString("ap11111.eastus.azure.accesspoint.confluent.cloud"), }, }, } From fb055efda6a9b2335a6ef4fcdf6314521d01dc97 Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Thu, 30 Apr 2026 20:29:34 -0500 Subject: [PATCH 09/18] Address PR review feedback from cqin-confluent - Fix GCP gateway type map to use correct constants for gcp-egress/ingress-private-service-connect - Update region flag description to include GCP - Add list filter test cases for azure-ingress-privatelink and gcp-ingress-private-service-connect types - Add cross-cloud flag validation and MarkFlagsMutuallyExclusive for ingress endpoint create Co-Authored-By: Claude Sonnet 4.6 (1M context) --- ...point_private_link_ingress_endpoint_create.go | 16 +++++++++++++--- internal/network/command_gateway.go | 6 +++--- .../list-filter-azure-ingress-type.golden | 4 ++++ .../gateway/list-filter-gcp-ingress-type.golden | 4 ++++ test/network_test.go | 2 ++ 5 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden create mode 100644 test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 2bce1914d8..70ea3dceb2 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -46,6 +46,7 @@ func (c *accessPointCommand) newIngressEndpointCreateCommand() *cobra.Command { cobra.CheckErr(cmd.MarkFlagRequired("cloud")) cobra.CheckErr(cmd.MarkFlagRequired("gateway")) + cmd.MarkFlagsMutuallyExclusive("vpc-endpoint-id", "private-endpoint-resource-id", "private-service-connect-connection-id") return cmd } @@ -101,7 +102,10 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st switch cloud { case pcloud.Aws: if vpcEndpointId == "" { - return fmt.Errorf("flag \"vpc-endpoint-id\" is required for AWS ingress endpoints") + return fmt.Errorf("flag \"vpc-endpoint-id\" is required for --cloud aws") + } + if privateEndpointResourceId != "" || privateServiceConnectConnectionId != "" { + return fmt.Errorf("\"--private-endpoint-resource-id\" and \"--private-service-connect-connection-id\" are not valid for --cloud aws; use \"--vpc-endpoint-id\"") } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1AwsIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AwsIngressPrivateLinkEndpoint{ @@ -111,7 +115,10 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st } case pcloud.Azure: if privateEndpointResourceId == "" { - return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for Azure ingress endpoints") + return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for --cloud azure") + } + if vpcEndpointId != "" || privateServiceConnectConnectionId != "" { + return fmt.Errorf("\"--vpc-endpoint-id\" and \"--private-service-connect-connection-id\" are not valid for --cloud azure; use \"--private-endpoint-resource-id\"") } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1AzureIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpoint{ @@ -121,7 +128,10 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st } case pcloud.Gcp: if privateServiceConnectConnectionId == "" { - return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for GCP ingress endpoints") + return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for --cloud gcp") + } + if vpcEndpointId != "" || privateEndpointResourceId != "" { + return fmt.Errorf("\"--vpc-endpoint-id\" and \"--private-endpoint-resource-id\" are not valid for --cloud gcp; use \"--private-service-connect-connection-id\"") } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 6ac1f5b457..0206540285 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -39,8 +39,8 @@ var ( "azure-ingress-privatelink": azureIngressPrivateLink, "gcp-egress-privatelink": "GcpEgressPrivateLink", "gcp-ingress-privatelink": "GcpIngressPrivateLink", - "gcp-egress-private-service-connect": "GcpEgressPrivateLink", - "gcp-ingress-private-service-connect": "GcpIngressPrivateLink", + "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, + "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, } ) @@ -86,7 +86,7 @@ func addGatewayTypeFlag(cmd *cobra.Command) { } func (c *command) addRegionFlagGateway(cmd *cobra.Command, command *pcmd.AuthenticatedCLICommand) { - cmd.Flags().String("region", "", "AWS or Azure region of the gateway.") + cmd.Flags().String("region", "", "AWS, Azure, or GCP region of the gateway.") pcmd.RegisterFlagCompletionFunc(cmd, "region", func(cmd *cobra.Command, args []string) []string { if err := c.PersistentPreRunE(cmd, args); err != nil { return nil diff --git a/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden b/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden new file mode 100644 index 0000000000..0708330c82 --- /dev/null +++ b/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden @@ -0,0 +1,4 @@ + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+---------+-------------------------+-------------------+---------------------------+--------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden b/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden new file mode 100644 index 0000000000..d3c04b5ab2 --- /dev/null +++ b/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden @@ -0,0 +1,4 @@ + ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+------------------------+-------------+-------------+---------------------------------+-------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------+-------+-------+---------+---------------- + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/network_test.go b/test/network_test.go index 0e83d6c260..9b022a998a 100644 --- a/test/network_test.go +++ b/test/network_test.go @@ -166,6 +166,8 @@ func (s *CLITestSuite) TestNetworkGatewayList() { {args: "network gateway list", fixture: "network/gateway/list.golden"}, {args: "network gateway list --output json", fixture: "network/gateway/list-json.golden"}, {args: "network gateway list --types aws-egress-privatelink", fixture: "network/gateway/list-filter-type.golden"}, + {args: "network gateway list --types azure-ingress-privatelink", fixture: "network/gateway/list-filter-azure-ingress-type.golden"}, + {args: "network gateway list --types gcp-ingress-private-service-connect", fixture: "network/gateway/list-filter-gcp-ingress-type.golden"}, {args: "network gateway list --id gw-12345", fixture: "network/gateway/list-filter-id.golden"}, {args: "network gateway list --region us-east-1", fixture: "network/gateway/list-filter-region.golden"}, {args: "network gateway list --display-name my-aws-gateway", fixture: "network/gateway/list-filter-name.golden"}, From a2b66f5542221e730cbad6d5937bcad52e2ab406 Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Mon, 4 May 2026 10:50:41 -0500 Subject: [PATCH 10/18] Fix GCP ingress type filter, cross-cloud flag validation, and update golden files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Revert gatewayTypeMap to use "GcpIngressPrivateLink"/"GcpEgressPrivateLink" for list filter values — staging testing confirmed the API accepts these, not the display type constants (GcpIngressPrivateServiceConnect) - Fix cross-cloud flag check order so wrong-cloud flags show a precise error message before the required-flag error - Update mock test server to use "GcpIngressPrivateLink"/"GcpEgressPrivateLink" for filter matching, consistent with real API behavior - Regenerate golden files for gateway list filters and help text Co-Authored-By: Claude Sonnet 4.6 (1M context) --- ...nt_private_link_ingress_endpoint_create.go | 18 +++++++-------- internal/network/command_gateway.go | 4 ++-- .../ingress-endpoint/create-help.golden | 22 ++++++++++++++----- .../output/network/gateway/create-help.golden | 14 +++++++++--- .../output/network/gateway/list-help.golden | 2 +- test/test-server/networking_handlers.go | 4 ++-- 6 files changed, 41 insertions(+), 23 deletions(-) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 70ea3dceb2..3f719e00dd 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -101,12 +101,12 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st switch cloud { case pcloud.Aws: - if vpcEndpointId == "" { - return fmt.Errorf("flag \"vpc-endpoint-id\" is required for --cloud aws") - } if privateEndpointResourceId != "" || privateServiceConnectConnectionId != "" { return fmt.Errorf("\"--private-endpoint-resource-id\" and \"--private-service-connect-connection-id\" are not valid for --cloud aws; use \"--vpc-endpoint-id\"") } + if vpcEndpointId == "" { + return fmt.Errorf("flag \"vpc-endpoint-id\" is required for --cloud aws") + } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1AwsIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AwsIngressPrivateLinkEndpoint{ Kind: "AwsIngressPrivateLinkEndpoint", @@ -114,12 +114,12 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st }, } case pcloud.Azure: - if privateEndpointResourceId == "" { - return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for --cloud azure") - } if vpcEndpointId != "" || privateServiceConnectConnectionId != "" { return fmt.Errorf("\"--vpc-endpoint-id\" and \"--private-service-connect-connection-id\" are not valid for --cloud azure; use \"--private-endpoint-resource-id\"") } + if privateEndpointResourceId == "" { + return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for --cloud azure") + } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1AzureIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpoint{ Kind: "AzureIngressPrivateLinkEndpoint", @@ -127,12 +127,12 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st }, } case pcloud.Gcp: - if privateServiceConnectConnectionId == "" { - return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for --cloud gcp") - } if vpcEndpointId != "" || privateEndpointResourceId != "" { return fmt.Errorf("\"--vpc-endpoint-id\" and \"--private-endpoint-resource-id\" are not valid for --cloud gcp; use \"--private-service-connect-connection-id\"") } + if privateServiceConnectConnectionId == "" { + return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for --cloud gcp") + } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ Kind: "GcpIngressPrivateServiceConnectEndpoint", diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 0206540285..18b128708e 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -39,8 +39,8 @@ var ( "azure-ingress-privatelink": azureIngressPrivateLink, "gcp-egress-privatelink": "GcpEgressPrivateLink", "gcp-ingress-privatelink": "GcpIngressPrivateLink", - "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, - "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, + "gcp-egress-private-service-connect": "GcpEgressPrivateLink", + "gcp-ingress-private-service-connect": "GcpIngressPrivateLink", } ) diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden index 06c88c8aa9..cf4d05729b 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden @@ -8,13 +8,23 @@ Create an AWS PrivateLink ingress endpoint. $ confluent network access-point private-link ingress-endpoint create --cloud aws --gateway gw-123456 --vpc-endpoint-id vpce-00000000000000000 +Create an Azure Private Link ingress endpoint. + + $ confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName + +Create a GCP Private Service Connect ingress endpoint. + + $ confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --private-service-connect-connection-id 111111111111111111 + Flags: - --cloud string REQUIRED: Specify the cloud provider as "aws". - --vpc-endpoint-id string REQUIRED: ID of an AWS VPC endpoint. - --gateway string REQUIRED: Gateway ID. - --context string CLI context name. - --environment string Environment ID. - -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --vpc-endpoint-id string ID of an AWS VPC endpoint. + --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint. + --private-service-connect-connection-id string ID of a GCP Private Service Connect connection. + --gateway string REQUIRED: Gateway ID. + --context string CLI context name. + --environment string Environment ID. + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") Global Flags: -h, --help Show help for this command. diff --git a/test/fixtures/output/network/gateway/create-help.golden b/test/fixtures/output/network/gateway/create-help.golden index 94b5f8268a..4c6dd26d2e 100644 --- a/test/fixtures/output/network/gateway/create-help.golden +++ b/test/fixtures/output/network/gateway/create-help.golden @@ -16,10 +16,18 @@ Create AWS private network interface gateway "my-pni-gateway". $ confluent network gateway create my-pni-gateway --cloud aws --region us-east-1 --type private-network-interface +Create Azure ingress private link gateway "my-azure-ingress-gateway". + + $ confluent network gateway create my-azure-ingress-gateway --cloud azure --region eastus2 --type ingress-privatelink + +Create GCP ingress private service connect gateway "my-gcp-ingress-gateway". + + $ confluent network gateway create my-gcp-ingress-gateway --cloud gcp --region us-central1 --type ingress-private-service-connect + Flags: - --cloud string REQUIRED: Specify the cloud provider as "aws" or "azure". - --type string REQUIRED: Specify the gateway type as "egress-privatelink", "ingress-privatelink", or "private-network-interface". - --region string REQUIRED: AWS or Azure region of the gateway. + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --type string REQUIRED: Specify the gateway type as "egress-privatelink", "ingress-privatelink", "private-network-interface", or "ingress-private-service-connect". + --region string REQUIRED: AWS, Azure, or GCP region of the gateway. --zones strings A comma-separated list of availability zones for this gateway. --context string CLI context name. --environment string Environment ID. diff --git a/test/fixtures/output/network/gateway/list-help.golden b/test/fixtures/output/network/gateway/list-help.golden index 760d8cc1df..9657ebcb4b 100644 --- a/test/fixtures/output/network/gateway/list-help.golden +++ b/test/fixtures/output/network/gateway/list-help.golden @@ -4,7 +4,7 @@ Usage: confluent network gateway list [flags] Flags: - --types strings A comma-separated list of gateway types: "aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", or "gcp-egress-private-service-connect". + --types strings A comma-separated list of gateway types: "aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-privatelink", "gcp-ingress-privatelink", "gcp-egress-private-service-connect", or "gcp-ingress-private-service-connect". --id strings A comma-separated list of gateway IDs. --region strings A comma-separated list of regions. --display-name strings A comma-separated list of display names. diff --git a/test/test-server/networking_handlers.go b/test/test-server/networking_handlers.go index c8310ec98c..4d7ef3ce97 100644 --- a/test/test-server/networking_handlers.go +++ b/test/test-server/networking_handlers.go @@ -2668,10 +2668,10 @@ func getGatewayTypeFromSpec(gateway networkinggatewayv1.NetworkingV1Gateway) str return "GcpPeering" } if config.NetworkingV1GcpEgressPrivateServiceConnectGatewaySpec != nil { - return "GcpEgressPrivateServiceConnect" + return "GcpEgressPrivateLink" } if config.NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec != nil { - return "GcpIngressPrivateServiceConnect" + return "GcpIngressPrivateLink" } return "" } From b219610ea05590d9a6761357f14aa1fca0c4a933 Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 5 May 2026 10:05:52 -0500 Subject: [PATCH 11/18] Address cqin review: extract GCP filter type constants, remove unreachable cross-cloud checks - Add gcpEgressPrivateLink and gcpIngressPrivateLink constants to const block and use them in gatewayTypeMap instead of inline strings - Remove cross-cloud flag rejection checks since MarkFlagsMutuallyExclusive already prevents two cloud-specific flags from being set together Co-Authored-By: Claude Sonnet 4.6 (1M context) --- ...ccess_point_private_link_ingress_endpoint_create.go | 9 --------- internal/network/command_gateway.go | 10 ++++++---- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 3f719e00dd..47e0e9532a 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -101,9 +101,6 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st switch cloud { case pcloud.Aws: - if privateEndpointResourceId != "" || privateServiceConnectConnectionId != "" { - return fmt.Errorf("\"--private-endpoint-resource-id\" and \"--private-service-connect-connection-id\" are not valid for --cloud aws; use \"--vpc-endpoint-id\"") - } if vpcEndpointId == "" { return fmt.Errorf("flag \"vpc-endpoint-id\" is required for --cloud aws") } @@ -114,9 +111,6 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st }, } case pcloud.Azure: - if vpcEndpointId != "" || privateServiceConnectConnectionId != "" { - return fmt.Errorf("\"--vpc-endpoint-id\" and \"--private-service-connect-connection-id\" are not valid for --cloud azure; use \"--private-endpoint-resource-id\"") - } if privateEndpointResourceId == "" { return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for --cloud azure") } @@ -127,9 +121,6 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st }, } case pcloud.Gcp: - if vpcEndpointId != "" || privateEndpointResourceId != "" { - return fmt.Errorf("\"--vpc-endpoint-id\" and \"--private-endpoint-resource-id\" are not valid for --cloud gcp; use \"--private-service-connect-connection-id\"") - } if privateServiceConnectConnectionId == "" { return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for --cloud gcp") } diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 18b128708e..7636e20429 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -27,6 +27,8 @@ const ( gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" azureIngressPrivateLink = "AzureIngressPrivateLink" + gcpEgressPrivateLink = "GcpEgressPrivateLink" + gcpIngressPrivateLink = "GcpIngressPrivateLink" ) var ( @@ -37,10 +39,10 @@ var ( "aws-ingress-privatelink": awsIngressPrivateLink, "azure-egress-privatelink": azureEgressPrivateLink, "azure-ingress-privatelink": azureIngressPrivateLink, - "gcp-egress-privatelink": "GcpEgressPrivateLink", - "gcp-ingress-privatelink": "GcpIngressPrivateLink", - "gcp-egress-private-service-connect": "GcpEgressPrivateLink", - "gcp-ingress-private-service-connect": "GcpIngressPrivateLink", + "gcp-egress-privatelink": gcpEgressPrivateLink, + "gcp-ingress-privatelink": gcpIngressPrivateLink, + "gcp-egress-private-service-connect": gcpEgressPrivateLink, + "gcp-ingress-private-service-connect": gcpIngressPrivateLink, } ) From a28983954c0d9833d84b097e35e746ceaf1b191b Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 5 May 2026 10:15:52 -0500 Subject: [PATCH 12/18] Add validation and tests for invalid cloud/type combinations - Validate that cloud+type is a supported combination in gateway create, returning a clear error instead of sending a nil Config to the API - Add integration tests for: cloud/type mismatch, wrong-cloud flag, and two mutually exclusive cloud flags set together Co-Authored-By: Claude Sonnet 4.6 (1M context) --- internal/network/command_gateway_create.go | 5 +++ .../create-two-cloud-flags.golden | 32 +++++++++++++++++++ .../create-wrong-cloud-flag.golden | 1 + .../gateway/create-invalid-cloud-type.golden | 1 + test/network_test.go | 3 ++ 5 files changed, 42 insertions(+) create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden create mode 100644 test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden create mode 100644 test/fixtures/output/network/gateway/create-invalid-cloud-type.golden diff --git a/internal/network/command_gateway_create.go b/internal/network/command_gateway_create.go index d6e9242d59..6cc79b5203 100644 --- a/internal/network/command_gateway_create.go +++ b/internal/network/command_gateway_create.go @@ -1,6 +1,7 @@ package network import ( + "fmt" "strings" "github.com/spf13/cobra" @@ -142,6 +143,10 @@ func (c *command) gatewayCreate(cmd *cobra.Command, args []string) error { } } + if createGateway.Spec.Config == nil { + return fmt.Errorf("type %q is not supported for --cloud %s", gatewayType, strings.ToLower(cloud)) + } + if len(args) == 1 { createGateway.Spec.SetDisplayName(args[0]) } diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden new file mode 100644 index 0000000000..264c50558e --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden @@ -0,0 +1,32 @@ +Error: if any flags in the group [vpc-endpoint-id private-endpoint-resource-id private-service-connect-connection-id] are set none of the others can be; [private-endpoint-resource-id vpc-endpoint-id] were all set +Usage: + confluent network access-point private-link ingress-endpoint create [name] [flags] + +Examples: +Create an AWS PrivateLink ingress endpoint. + + $ confluent network access-point private-link ingress-endpoint create --cloud aws --gateway gw-123456 --vpc-endpoint-id vpce-00000000000000000 + +Create an Azure Private Link ingress endpoint. + + $ confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName + +Create a GCP Private Service Connect ingress endpoint. + + $ confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --private-service-connect-connection-id 111111111111111111 + +Flags: + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --vpc-endpoint-id string ID of an AWS VPC endpoint. + --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint. + --private-service-connect-connection-id string ID of a GCP Private Service Connect connection. + --gateway string REQUIRED: Gateway ID. + --context string CLI context name. + --environment string Environment ID. + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + +Global Flags: + -h, --help Show help for this command. + --unsafe-trace Equivalent to -vvvv, but also log HTTP requests and responses which might contain plaintext secrets. + -v, --verbose count Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace). + diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden new file mode 100644 index 0000000000..00af71ef5e --- /dev/null +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden @@ -0,0 +1 @@ +Error: flag "private-endpoint-resource-id" is required for --cloud azure diff --git a/test/fixtures/output/network/gateway/create-invalid-cloud-type.golden b/test/fixtures/output/network/gateway/create-invalid-cloud-type.golden new file mode 100644 index 0000000000..8b5dde5e18 --- /dev/null +++ b/test/fixtures/output/network/gateway/create-invalid-cloud-type.golden @@ -0,0 +1 @@ +Error: type "ingress-private-service-connect" is not supported for --cloud aws diff --git a/test/network_test.go b/test/network_test.go index 9b022a998a..427900b3f6 100644 --- a/test/network_test.go +++ b/test/network_test.go @@ -132,6 +132,7 @@ func (s *CLITestSuite) TestNetworkGateway() { {args: "network gateway delete gw-12345 gw-54321", input: "y\n", fixture: "network/gateway/delete-multiple.golden"}, {args: "network gateway delete gw-11111", input: "y\n", fixture: "network/gateway/delete-azure-ingress.golden"}, {args: "network gateway delete gw-11111 gw-67890", input: "y\n", fixture: "network/gateway/delete-azure-ingress-multiple.golden"}, + {args: "network gateway create my-gateway --cloud aws --type ingress-private-service-connect --region us-west-2", fixture: "network/gateway/create-invalid-cloud-type.golden", exitCode: 1}, {args: "network gateway delete gw-invalid", input: "y\n", fixture: "network/gateway/delete-fail.golden", exitCode: 1}, } @@ -1184,6 +1185,8 @@ func (s *CLITestSuite) TestNetworkAccessPointPrivateLinkIngressEndpoint() { {args: "network access-point private-link ingress-endpoint update ap-22222 --name my-new-gcp-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-gcp.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-88888", input: "y\n", fixture: "network/access-point/private-link/ingress-endpoint/delete.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-99999 ap-88888", input: "y\n", fixture: "network/access-point/private-link/ingress-endpoint/delete-multiple.golden"}, + {args: "network access-point private-link ingress-endpoint create --cloud azure --gateway gw-11111 --vpc-endpoint-id vpce-1234567890abcdef0", fixture: "network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden", exitCode: 1}, + {args: "network access-point private-link ingress-endpoint create --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe", fixture: "network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden", exitCode: 1}, {args: "network access-point private-link ingress-endpoint delete ap-invalid", fixture: "network/access-point/private-link/ingress-endpoint/delete-fail.golden", exitCode: 1}, } From 82d9932c916919ce464a353a274197b4e944e43f Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 5 May 2026 14:17:02 -0500 Subject: [PATCH 13/18] Switch from internal to public networking SDK v0.7.0/v0.10.0 Replace replace directives pointing to ccloud-sdk-go-v2-internal with the published public versions: - networking-gateway: v0.5.0 -> v0.7.0 - networking-access-point: v0.8.0 -> v0.10.0 This fixes the gomoddirectives linter failure in CI. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- go.mod | 8 ++------ go.sum | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 93fd918970..1d75c87a29 100644 --- a/go.mod +++ b/go.mod @@ -40,9 +40,9 @@ require ( github.com/confluentinc/ccloud-sdk-go-v2/mds v0.4.0 github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0 - github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.8.0 + github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.10.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0 - github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.5.0 + github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.7.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0 github.com/confluentinc/ccloud-sdk-go-v2/org v0.9.0 @@ -289,7 +289,3 @@ require ( sigs.k8s.io/yaml v1.3.0 // indirect ) -replace ( - github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point => github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-access-point v0.13.0 - github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway => github.com/confluentinc/ccloud-sdk-go-v2-internal/networking-gateway v0.13.0 -) diff --git a/go.sum b/go.sum index 720b0e5e64..6b9ab48391 100644 --- a/go.sum +++ b/go.sum @@ -242,8 +242,12 @@ github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0 h1:TWwZHdfo2XNKrnGOuxXx4 github.com/confluentinc/ccloud-sdk-go-v2/metrics v0.2.0/go.mod h1:odGsHChrn2l+jaOvx4Gib5//U4a3Id79wstQVkNh8v0= github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0 h1:btDFGijvzpWaKLKztc7S9YenbtGTsHgjs4+fNuyYceI= github.com/confluentinc/ccloud-sdk-go-v2/networking v0.14.0/go.mod h1:6BDrwG6OfSnT++Yr3mXStvmy4Jb8uMtdfKK7sZO/X+M= +github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.10.0 h1:tVwzT8htKDlXzNOCWNMZ1TU/80LhZ1sH6Xm6YzC4whg= +github.com/confluentinc/ccloud-sdk-go-v2/networking-access-point v0.10.0/go.mod h1:ipbT20AMDVklb9WaQpKNafozAqktfD47WzYI3GpJKEI= github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0 h1:LT8trYIkMZ7EFM7nZZOkmH12B7AgOEvZYZjw86nazD0= github.com/confluentinc/ccloud-sdk-go-v2/networking-dnsforwarder v0.4.0/go.mod h1:HPu3Cd7HQ2NdTeL6f3nvrsFB69N9yugB/W4qV8wqE/c= +github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.7.0 h1:beFrkKcUWf2Frbziwsdxjpcg1JdJBGHp1cc6SRS+t80= +github.com/confluentinc/ccloud-sdk-go-v2/networking-gateway v0.7.0/go.mod h1:2NZfTmNYHQea+1h6W99nNq0r23/mSQu3Liz8B78z7Dg= github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0 h1:ZHNF2DeqVlNPuKGZ41SBMLGj8GBlvvcwOPnfZLZXA/4= github.com/confluentinc/ccloud-sdk-go-v2/networking-ip v0.2.0/go.mod h1:KTShFBZA7WG8LcxlWjJpoZFdWkJ+uOw3dDuwAHs5eKU= github.com/confluentinc/ccloud-sdk-go-v2/networking-privatelink v0.3.0 h1:mC0E1nKUt57AxMM4Lpdfd+KA/YZwJVwro9ER+dCUFi8= From 82fc158c7c44b33a5f3bcf975e06ec013842b4fc Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 5 May 2026 16:52:44 -0500 Subject: [PATCH 14/18] Address cqin review feedback: zones validation, error message, naming, flag descriptions - Reject --zones upfront when --type is not private-network-interface - Add ErrorMessage field to ingressEndpointOut, populated from Status.GetErrorMessage() - Update VpcEndpointServiceName human/serialized name to include AWS prefix - Update cloud-specific flag descriptions to indicate valid --cloud value - Drop gcp-egress-privatelink and gcp-ingress-privatelink aliases from listGatewayTypes and gatewayTypeMap; keep only gcp-*-private-service-connect Co-Authored-By: Claude Sonnet 4.6 (1M context) --- GCP_AZURE_INGRESS_MANUAL_TEST.md | 347 ++++++++++++++++ GCP_INGRESS_IMPLEMENTATION_PLAN.md | 380 ++++++++++++++++++ ...ess_point_private_link_ingress_endpoint.go | 12 +- ...nt_private_link_ingress_endpoint_create.go | 6 +- ...oint_private_link_ingress_endpoint_list.go | 11 +- internal/network/command_gateway.go | 6 +- internal/network/command_gateway_create.go | 4 + .../ingress-endpoint/create-help.golden | 6 +- .../create-two-cloud-flags.golden | 6 +- .../network/gateway/create-aws-ingress.golden | 18 +- .../list-filter-azure-ingress-type.golden | 8 +- .../list-filter-gcp-ingress-type.golden | 8 +- .../network/gateway/list-filter-id.golden | 8 +- .../gateway/list-filter-multiple.golden | 8 +- .../network/gateway/list-filter-name.golden | 10 +- .../network/gateway/list-filter-phase.golden | 2 +- .../network/gateway/list-filter-region.golden | 8 +- .../network/gateway/list-filter-type.golden | 8 +- .../output/network/gateway/list-help.golden | 2 +- .../output/network/gateway/list-json.golden | 2 +- .../output/network/gateway/list.golden | 2 +- 21 files changed, 797 insertions(+), 65 deletions(-) create mode 100644 GCP_AZURE_INGRESS_MANUAL_TEST.md create mode 100644 GCP_INGRESS_IMPLEMENTATION_PLAN.md diff --git a/GCP_AZURE_INGRESS_MANUAL_TEST.md b/GCP_AZURE_INGRESS_MANUAL_TEST.md new file mode 100644 index 0000000000..26fae5965e --- /dev/null +++ b/GCP_AZURE_INGRESS_MANUAL_TEST.md @@ -0,0 +1,347 @@ +# GCP IngressPrivateServiceConnect & Azure IngressPrivateLink CLI Testing + +Corresponding PR: #3283 Add Azure and GCP ingress access point and gateway support + +## Prerequisites + +``` +dist/confluent_darwin_arm64_v8.0/confluent login --url stag.cpdev.cloud --organization 94b47aa0-ed3a-44da-9460-6cec0c710e84 --save +``` + +--- + +## Test Checklist + +### Gateways + +- [x] **1. Create Azure ingress gateway** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway create test-azure-ingress --cloud azure --region centralus --type ingress-privatelink ++-------------+-------------------------+ +| ID | gw-stgc6dj0d2 | +| Name | test-azure-ingress | +| Environment | env-stgcznd2qz | +| Region | centralus | +| Type | AzureIngressPrivateLink | +| Phase | PROVISIONING | ++-------------+-------------------------+ +``` +Expected: gateway created, `Type: AzureIngressPrivateLink`, phase `PROVISIONING` ✅ + +- [x] **2. Create GCP ingress gateway** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway create test-gcp-ingress --cloud gcp --region us-central1 --type ingress-private-service-connect ++-------------+---------------------------------+ +| ID | gw-stgco5rq5v | +| Name | test-gcp-ingress | +| Environment | env-stgcznd2qz | +| Region | us-central1 | +| Type | GcpIngressPrivateServiceConnect | +| Phase | PROVISIONING | ++-------------+---------------------------------+ +``` +Expected: gateway created, `Type: GcpIngressPrivateServiceConnect`, phase `PROVISIONING` ✅ + +- [x] **3. Describe Azure gateway** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway describe gw-stgc6dj0d2 ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ID | gw-stgc6dj0d2 | +| Name | test-azure-ingress | +| Environment | env-stgcznd2qz | +| Region | centralus | +| Type | AzureIngressPrivateLink | +| Azure Private Link Service | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | +| Alias | | +| Azure Private Link Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | +| Phase | CREATED | ++--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +``` +Expected: `Azure Private Link Service Alias` and `Azure Private Link Resource ID` populated ✅ + +- [x] **4. Describe GCP gateway** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway describe gw-stgco5rq5v ++----------------------------+---------------------------------------------------------------------------------------------------+ +| ID | gw-stgco5rq5v | +| Name | test-gcp-ingress | +| Environment | env-stgcznd2qz | +| Region | us-central1 | +| Type | GcpIngressPrivateServiceConnect | +| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | +| Phase | CREATED | ++----------------------------+---------------------------------------------------------------------------------------------------+ +``` +Expected: `GCP PSC Service Attachment` populated ✅ + +- [x] **5. Filter by Azure ingress type** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway list --types azure-ingress-privatelink --output yaml +- id: gw-stgc1q5k9v + name: test-azure-ingress-gateway-updated + environment: env-stgcznd2qz + region: centralus + type: AzureIngressPrivateLink + azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice + azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink + phase: READY +- id: gw-stgc6dj0d2 + name: test-azure-ingress + environment: env-stgcznd2qz + region: centralus + type: AzureIngressPrivateLink + azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice + azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink + phase: CREATED +``` +Expected: only Azure ingress gateways returned ✅ + +- [x] **6. Filter by GCP ingress type** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway list --types gcp-ingress-private-service-connect --output yaml +- id: gw-stgc6ed3l2 + name: test-gcp-ingress-gateway-updated + environment: env-stgcznd2qz + region: us-central1 + type: GcpIngressPrivateServiceConnect + gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment + phase: READY +- id: gw-stgco5rq5v + name: test-gcp-ingress + environment: env-stgcznd2qz + region: us-central1 + type: GcpIngressPrivateServiceConnect + gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment + phase: CREATED +``` +Expected: only GCP ingress gateways returned ✅ + +- [x] **7. Filter by both types** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network gateway list --types azure-ingress-privatelink,gcp-ingress-private-service-connect --output yaml +- id: gw-stgc1q5k9v + name: test-azure-ingress-gateway-updated + environment: env-stgcznd2qz + region: centralus + type: AzureIngressPrivateLink + azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice + azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink + phase: READY +- id: gw-stgc6dj0d2 + name: test-azure-ingress + environment: env-stgcznd2qz + region: centralus + type: AzureIngressPrivateLink + azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice + azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink + phase: CREATED +- id: gw-stgc6ed3l2 + name: test-gcp-ingress-gateway-updated + environment: env-stgcznd2qz + region: us-central1 + type: GcpIngressPrivateServiceConnect + gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment + phase: READY +- id: gw-stgco5rq5v + name: test-gcp-ingress + environment: env-stgcznd2qz + region: us-central1 + type: GcpIngressPrivateServiceConnect + gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment + phase: CREATED +``` +Expected: both Azure and GCP ingress gateways returned ✅ + +--- + +### Access Points + +- [x] **8. Create Azure ingress access point** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint create \ + --cloud azure \ + --gateway gw-stgc6dj0d2 \ + --private-endpoint-resource-id /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ID | ap-stgcdnlrn4 | +| Environment | env-stgcznd2qz | +| Gateway | gw-stgc6dj0d2 | +| Phase | PROVISIONING | +| Azure Private Link Service Alias | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | +| Azure Private Link Service Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | +| Azure Private Endpoint Resource ID | /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli | +| DNS Domain | apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +``` +Expected: access point created, `Azure Private Endpoint Resource ID` and `DNS Domain` populated ✅ + +- [x] **9. Create GCP ingress access point** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint create \ + --cloud gcp \ + --gateway gw-stgco5rq5v \ + --private-service-connect-connection-id 8345469524639756 ++----------------------------+---------------------------------------------------------------------------------------------------+ +| ID | ap-stgc4w0oo8 | +| Environment | env-stgcznd2qz | +| Gateway | gw-stgco5rq5v | +| Phase | PROVISIONING | +| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | +| GCP PSC Connection ID | 8345469524639756 | +| DNS Domain | apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud | ++----------------------------+---------------------------------------------------------------------------------------------------+ + +``` +Expected: access point created, `GCP PSC Connection ID` and `DNS Domain` populated ✅ + +- [x] **10. Verify cross-cloud flag rejection** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint create \ + --cloud gcp \ + --gateway gw-stgco5rq5v \ + --private-endpoint-resource-id /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli +Error: "--vpc-endpoint-id" and "--private-endpoint-resource-id" are not valid for --cloud gcp; use "--private-service-connect-connection-id" +``` +Expected: error `"--private-endpoint-resource-id" is not valid for --cloud gcp` ✅ + +- [x] **11. Update access point** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint update ap-stgcdnlrn4 --name my-azure-ingress-ap ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ID | ap-stgcdnlrn4 | +| Name | my-azure-ingress-ap | +| Environment | env-stgcznd2qz | +| Gateway | gw-stgc6dj0d2 | +| Phase | READY | +| Azure Private Link Service Alias | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | +| Azure Private Link Service Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | +| Azure Private Endpoint Resource ID | /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli | +| DNS Domain | apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint update ap-stgc4w0oo8 --name my-gcp-ingress-ap ++----------------------------+---------------------------------------------------------------------------------------------------+ +| ID | ap-stgc4w0oo8 | +| Name | my-gcp-ingress-ap | +| Environment | env-stgcznd2qz | +| Gateway | gw-stgco5rq5v | +| Phase | READY | +| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | +| GCP PSC Connection ID | 8345469524639756 | +| DNS Domain | apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud | ++----------------------------+---------------------------------------------------------------------------------------------------+ +``` +Expected: name updated, other fields unchanged ✅ + +- [x] **12. Describe Azure access point** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint describe ap-stgcdnlrn4 ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ID | ap-stgcdnlrn4 | +| Name | my-azure-ingress-ap | +| Environment | env-stgcznd2qz | +| Gateway | gw-stgc6dj0d2 | +| Phase | READY | +| Azure Private Link Service Alias | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | +| Azure Private Link Service Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | +| Azure Private Endpoint Resource ID | /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli | +| DNS Domain | apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud | ++----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +``` +Expected: `Azure Private Link Service Alias`, `Azure Private Endpoint Resource ID`, `DNS Domain` populated ✅ + +- [x] **13. Describe GCP access point** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint describe ap-stgc4w0oo8 ++----------------------------+---------------------------------------------------------------------------------------------------+ +| ID | ap-stgc4w0oo8 | +| Name | my-gcp-ingress-ap | +| Environment | env-stgcznd2qz | +| Gateway | gw-stgco5rq5v | +| Phase | READY | +| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | +| GCP PSC Connection ID | 8345469524639756 | +| DNS Domain | apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud | ++----------------------------+---------------------------------------------------------------------------------------------------+ +``` +Expected: `GCP PSC Service Attachment`, `GCP PSC Connection ID`, `DNS Domain` populated ✅ + +- [x] **14. List all access points** +``` +$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint list --output yaml +- id: ap-stgc4pwgn8 + name: test-azure-ingress-ap-updated + environment: env-stgcznd2qz + gateway: gw-stgc1q5k9v + phase: READY + azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice + azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink + azure_private_endpoint_resource_id: /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing + dns_domain: apstgc4pwgn8.centralus.azure.accesspoint.stag.cpdev.cloud +- id: ap-stgc4w0oo8 + name: my-gcp-ingress-ap + environment: env-stgcznd2qz + gateway: gw-stgco5rq5v + phase: READY + gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment + gcp_private_service_connect_connection_id: "8345469524639756" + dns_domain: apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud +- id: ap-stgcdnlnn4 + name: test-gcp-ingress-ap-updated + environment: env-stgcznd2qz + gateway: gw-stgc6ed3l2 + phase: READY + gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment + gcp_private_service_connect_connection_id: "8345469524639755" + dns_domain: apstgcdnlnn4.us-central1.gcp.accesspoint.stag.cpdev.cloud +- id: ap-stgcdnlrn4 + name: my-azure-ingress-ap + environment: env-stgcznd2qz + gateway: gw-stgc6dj0d2 + phase: READY + azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice + azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink + azure_private_endpoint_resource_id: /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli + dns_domain: apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud +``` +Expected: Azure and GCP access points listed with correct cloud-specific fields ✅ + +--- + +### Automated Tests + +- [x] **15. Integration tests** +``` +$ make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestNetworkGateway" +ok github.com/confluentinc/cli/v4/test 8.344s + +$ make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestNetworkAccessPointPrivateLinkIngressEndpoint" +ok github.com/confluentinc/cli/v4/test 6.327s + +$ make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestHelp" +ok github.com/confluentinc/cli/v4/test 135.274s +``` +Expected: all pass ✅ + +--- + +## Results + +| # | Test | Result | Notes | +|---|------|--------|-------| +| 1 | Create Azure gateway | ✅ Pass | | +| 2 | Create GCP gateway | ✅ Pass | | +| 3 | Describe Azure gateway | ✅ Pass | Phase: CREATED, Azure PL Service Alias and Resource ID populated | +| 4 | Describe GCP gateway | ✅ Pass | Phase: CREATED, GCP PSC Service Attachment populated | +| 5 | Filter Azure ingress type | ✅ Pass | | +| 6 | Filter GCP ingress type | ✅ Pass | Original map values restored after manual testing revealed API expects "GcpIngressPrivateLink" not "GcpIngressPrivateServiceConnect" | +| 7 | Filter both types | ✅ Pass | | +| 8 | Create Azure access point | ✅ Pass | ap-stgcdnlrn4, Phase: READY | +| 9 | Create GCP access point | ✅ Pass | ap-stgc4w0oo8, Phase: READY | +| 10 | Cross-cloud flag rejection | ✅ Pass | Fixed check order so cross-cloud message shows before required message | +| 11 | Update access point | ✅ Pass | | +| 12 | Describe Azure access point | ✅ Pass | | +| 13 | Describe GCP access point | ✅ Pass | | +| 14 | List access points | ✅ Pass | | +| 15 | Automated tests | ✅ Pass | | diff --git a/GCP_INGRESS_IMPLEMENTATION_PLAN.md b/GCP_INGRESS_IMPLEMENTATION_PLAN.md new file mode 100644 index 0000000000..bc086f1450 --- /dev/null +++ b/GCP_INGRESS_IMPLEMENTATION_PLAN.md @@ -0,0 +1,380 @@ +# GCP Ingress Private Link Implementation Plan + +## Overview +Add GCP support for ingress private link endpoints, following the pattern established by AWS ingress implementation (commit 31b97e2). + +## Prerequisites +- [ ] Verify SDK has `NetworkingV1GcpIngressPrivateServiceConnectEndpoint` types +- [ ] Check if SDK version needs to be updated for GCP ingress support +- [ ] Confirm GCP ingress gateway types exist in `networking-gateway` SDK + +--- + +## Step 1: SDK Version Check +**Goal:** Ensure SDK has the necessary GCP ingress types + +**Tasks:** +1. Check current SDK version in `go.mod` +2. Search for GCP ingress types in SDK: + - `NetworkingV1GcpIngressPrivateServiceConnectEndpoint` + - `NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus` + - `NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec` +3. Update SDK versions if needed (like AWS did: networking-access-point v0.5.0 → v0.8.0) + +**Files to check:** +- `go.mod` +- SDK documentation/types + +--- + +## Step 2: Update Ingress Endpoint Output Struct +**File:** `internal/network/command_access_point_private_link_ingress_endpoint.go` + +**Changes:** +Add GCP-specific fields to `ingressEndpointOut` struct (around line 17-26): + +```go +type ingressEndpointOut struct { + Id string `human:"ID" serialized:"id"` + Name string `human:"Name,omitempty" serialized:"name,omitempty"` + Environment string `human:"Environment" serialized:"environment"` + Gateway string `human:"Gateway" serialized:"gateway"` + Phase string `human:"Phase" serialized:"phase"` + + // AWS fields + AwsVpcEndpointId string `human:"AWS VPC Endpoint ID,omitempty" serialized:"aws_vpc_endpoint_id,omitempty"` + AwsVpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` + DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` + + // GCP fields (ADD THESE - based on egress pattern) + GcpPrivateServiceConnectServiceAttachment string `human:"GCP Private Service Connect Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` + GcpPrivateServiceConnectConnectionId string `human:"GCP Private Service Connect Connection ID,omitempty" serialized:"gcp_private_service_connect_connection_id,omitempty"` + GcpPrivateServiceConnectEndpointIpAddress string `human:"GCP Private Service Connect Endpoint IP Address,omitempty" serialized:"gcp_private_service_connect_endpoint_ip_address,omitempty"` +} +``` + +**Note:** Field names should match what the GCP ingress SDK types provide. + +--- + +## Step 3: Update Create Command +**File:** `internal/network/command_access_point_private_link_ingress_endpoint_create.go` + +### 3.1 Update Command Flags (around line 29-39) +```go +pcmd.AddCloudFlag(cmd) // Change from AddCloudAwsFlag to support all clouds +cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint.") +cmd.Flags().String("psc-connection-id", "", "ID of a GCP Private Service Connect connection.") // ADD THIS + +cobra.CheckErr(cmd.MarkFlagRequired("cloud")) +cobra.CheckErr(cmd.MarkFlagRequired("gateway")) +// Make vpc-endpoint-id conditional, not always required +``` + +### 3.2 Update Examples (around line 22-27) +Add GCP example: +```go +examples.Example{ + Text: "Create a GCP Private Service Connect ingress endpoint.", + Code: "confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --psc-connection-id ", +}, +``` + +### 3.3 Update createIngressEndpoint function (around line 82-92) +Add GCP case to switch statement: +```go +switch cloud { +case pcloud.Aws: + createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ + NetworkingV1AwsIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AwsIngressPrivateLinkEndpoint{ + Kind: "AwsIngressPrivateLinkEndpoint", + VpcEndpointId: vpcEndpointId, + }, + } +case pcloud.Gcp: // ADD THIS CASE + pscConnectionId, err := cmd.Flags().GetString("psc-connection-id") + if err != nil { + return err + } + createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ + NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ + Kind: "GcpIngressPrivateServiceConnectEndpoint", + PrivateServiceConnectConnectionId: pscConnectionId, // Verify field name in SDK + }, + } +default: + return fmt.Errorf("ingress endpoints are only supported for AWS and GCP") +} +``` + +### 3.4 Add Flag Validation +Add logic to require the right flag for each cloud: +```go +// After getting cloud flag +if cloud == pcloud.Aws { + cobra.CheckErr(cmd.MarkFlagRequired("vpc-endpoint-id")) +} else if cloud == pcloud.Gcp { + cobra.CheckErr(cmd.MarkFlagRequired("psc-connection-id")) +} +``` + +--- + +## Step 4: Update List Command +**File:** `internal/network/command_access_point_private_link_ingress_endpoint_list.go` + +### 4.1 Update Filter Logic (around line 571-573) +Change from AWS-only filter to include GCP: +```go +for _, ingressEndpoint := range ingressEndpoints { + if ingressEndpoint.Spec == nil { + return fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "spec") + } + + // Filter to include both AWS and GCP ingress endpoints + config := ingressEndpoint.Spec.GetConfig() + if config.NetworkingV1AwsIngressPrivateLinkEndpoint == nil && + config.NetworkingV1GcpIngressPrivateServiceConnectEndpoint == nil { + continue // Skip if neither AWS nor GCP ingress endpoint + } + + if ingressEndpoint.Status == nil { + return fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "status") + } + + // ... rest of the code +} +``` + +### 4.2 Add GCP Status Extraction (around line 586-592) +```go +// Existing AWS status extraction +if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus != nil { + out.AwsVpcEndpointId = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetVpcEndpointId() + out.AwsVpcEndpointServiceName = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetVpcEndpointServiceName() + if ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.HasDnsDomain() { + out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetDnsDomain() + } +} + +// ADD GCP status extraction +if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { + out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() + out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() + out.GcpPrivateServiceConnectEndpointIpAddress = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectEndpointIpAddress() +} +``` + +**Note:** Verify actual method names in SDK (GetPrivateServiceConnectServiceAttachment, etc.) + +--- + +## Step 5: Update Print Function +**File:** `internal/network/command_access_point_private_link_ingress_endpoint.go` + +### 5.1 Update printPrivateLinkIngressEndpointTable (around line 282-293) +Add GCP status extraction (same as Step 4.2 above): +```go +// After AWS status extraction, add: +if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { + out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() + out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() + out.GcpPrivateServiceConnectEndpointIpAddress = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectEndpointIpAddress() +} +``` + +--- + +## Step 6: Update Autocomplete +**File:** `internal/network/command_access_point_private_link_ingress_endpoint.go` + +### 6.1 Update autocompleteIngressEndpoints (around line 255-257) +Change filter to include GCP: +```go +ingressEndpoints := slices.DeleteFunc(accessPoints, func(accessPoint networkingaccesspointv1.NetworkingV1AccessPoint) bool { + config := accessPoint.Spec.GetConfig() + return config.NetworkingV1AwsIngressPrivateLinkEndpoint == nil && + config.NetworkingV1GcpIngressPrivateServiceConnectEndpoint == nil +}) +``` + +--- + +## Step 7: Gateway Support (If Needed) +**Files:** +- `internal/network/command_gateway.go` +- `internal/network/command_gateway_create.go` +- `internal/network/command_gateway_list.go` + +### 7.1 Check if GCP Ingress Gateways Exist +Determine if GCP has ingress-specific gateway types or if existing GCP egress gateway handles both. + +### 7.2 If GCP Ingress Gateways Are Separate: + +**command_gateway.go:** +```go +const ( + awsEgressPrivateLink = "AwsEgressPrivateLink" + awsIngressPrivateLink = "AwsIngressPrivateLink" + gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" + gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" // ADD THIS + // ... +) + +var ( + createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface"} + listGatewayTypes = []string{ + "aws-egress-privatelink", + "aws-ingress-privatelink", + "azure-egress-privatelink", + "gcp-egress-private-service-connect", + "gcp-ingress-private-service-connect", // ADD THIS + } + gatewayTypeMap = map[string]string{ + "aws-egress-privatelink": awsEgressPrivateLink, + "aws-ingress-privatelink": awsIngressPrivateLink, + "azure-egress-privatelink": azureEgressPrivateLink, + "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, + "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, // ADD THIS + } +) +``` + +Add GCP ingress fields to `gatewayOut` struct and update: +- `getGatewayCloud()` to recognize GCP ingress gateways +- `getGatewayType()` to identify GCP ingress type +- `printGatewayTable()` to extract GCP ingress gateway details + +**command_gateway_create.go:** +Add GCP ingress case to gateway creation (similar to AWS ingress pattern) + +**command_gateway_list.go:** +Add GCP ingress handling in list output + +--- + +## Step 8: Update Tests +**Files:** +- `test/network_test.go` +- `test/test-server/networking_handlers.go` +- Test fixtures in `test/fixtures/output/network/access-point/private-link/ingress-endpoint/` + +### 8.1 Add Test Cases (test/network_test.go) +Around line 1170-1175, add GCP test cases: +```go +{args: "network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-12345 --psc-connection-id psc-abc123", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp.golden"}, +{args: "network access-point private-link ingress-endpoint create my-gcp-ingress --cloud gcp --gateway gw-12345 --psc-connection-id psc-abc123", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp-name.golden"}, +{args: "network access-point private-link ingress-endpoint describe ap-77777", fixture: "network/access-point/private-link/ingress-endpoint/describe-gcp.golden"}, +{args: "network access-point private-link ingress-endpoint describe ap-77777 --output json", fixture: "network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden"}, +``` + +### 8.2 Add Mock Server Handlers (test/test-server/networking_handlers.go) +Create GCP ingress endpoint mock responses similar to AWS: +- Mock access point with GCP ingress config +- Mock status responses with GCP-specific fields + +### 8.3 Create Golden Files +Create expected output fixtures: +- `create-gcp.golden` +- `create-gcp-name.golden` +- `describe-gcp.golden` +- `describe-gcp-json.golden` +- Update `list.golden` and `list-json.golden` to include GCP entries + +### 8.4 Update Gateway Tests (if applicable) +Add GCP ingress gateway tests if implementing gateway support + +--- + +## Step 9: Update Documentation/Examples + +### 9.1 Update Help Text +Ensure command help shows both AWS and GCP are supported + +### 9.2 Update Error Messages +Change "only supported for AWS" to "supported for AWS and GCP" + +--- + +## Step 10: Validation & Testing + +### 10.1 Pre-commit Checklist +- [ ] All tests pass: `go test ./...` +- [ ] Build succeeds: `go build` +- [ ] Linting passes +- [ ] Manual testing with test server + +### 10.2 Integration Testing +- [ ] Test GCP ingress endpoint create +- [ ] Test GCP ingress endpoint list +- [ ] Test GCP ingress endpoint describe +- [ ] Test GCP ingress endpoint update +- [ ] Test GCP ingress endpoint delete +- [ ] Test mixed AWS/GCP ingress endpoint list +- [ ] Test autocomplete with GCP endpoints +- [ ] Test GCP ingress gateway (if applicable) + +### 10.3 Edge Cases +- [ ] Test with invalid GCP connection IDs +- [ ] Test with missing required flags +- [ ] Test output formats (JSON, YAML) +- [ ] Test error handling for API failures + +--- + +## Open Questions to Resolve + +1. **SDK Field Names:** What are the exact field names in the GCP ingress SDK types? + - PrivateServiceConnectConnectionId? + - PrivateServiceConnectServiceAttachment? + - Check SDK documentation + +2. **Gateway Support:** Does GCP have separate ingress gateway types or does the existing GCP egress gateway handle both directions? + +3. **Required Fields:** What fields are required for GCP ingress endpoint creation? + - Just connection ID? + - Any additional configuration? + +4. **Status Fields:** What status information does GCP ingress return? + - Connection ID, IP address, service attachment? + - DNS/domain information? + +5. **Feature Flag:** Should GCP ingress be behind the same feature flag as AWS ingress, or a separate one? + +--- + +## Files Summary + +### Files to Modify: +1. `go.mod` (if SDK update needed) +2. `internal/network/command_access_point_private_link_ingress_endpoint.go` +3. `internal/network/command_access_point_private_link_ingress_endpoint_create.go` +4. `internal/network/command_access_point_private_link_ingress_endpoint_list.go` +5. `internal/network/command_gateway.go` (if GCP ingress gateways exist) +6. `internal/network/command_gateway_create.go` (if GCP ingress gateways exist) +7. `internal/network/command_gateway_list.go` (if GCP ingress gateways exist) +8. `test/network_test.go` +9. `test/test-server/networking_handlers.go` + +### Files to Create: +1. Test fixture golden files for GCP ingress endpoints + +--- + +## Estimated Effort + +- **Step 1 (SDK Check):** 30 minutes +- **Steps 2-6 (Core Implementation):** 2-3 hours +- **Step 7 (Gateway Support):** 1-2 hours (if needed) +- **Steps 8-9 (Tests & Docs):** 2-3 hours +- **Step 10 (Validation):** 1-2 hours + +**Total:** 6-11 hours depending on gateway requirements + +--- + +## References + +- AWS Ingress Commit: `31b97e26297183ae99b24f71b6b554d2295a7bc7` +- AWS Implementation pattern in `command_access_point_private_link_ingress_endpoint_*.go` +- GCP Egress Implementation pattern in `command_access_point_private_link_egress_endpoint_*.go` diff --git a/internal/network/command_access_point_private_link_ingress_endpoint.go b/internal/network/command_access_point_private_link_ingress_endpoint.go index 1f327377db..2d8eead351 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint.go @@ -28,6 +28,7 @@ type ingressEndpointOut struct { GcpPrivateServiceConnectServiceAttachment string `human:"GCP PSC Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` GcpPrivateServiceConnectConnectionId string `human:"GCP PSC Connection ID,omitempty" serialized:"gcp_private_service_connect_connection_id,omitempty"` DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` + ErrorMessage string `human:"Error Message,omitempty" serialized:"error_message,omitempty"` } func (c *accessPointCommand) newIngressEndpointCommand(cfg *config.Config) *cobra.Command { @@ -94,11 +95,12 @@ func printPrivateLinkIngressEndpointTable(cmd *cobra.Command, ingressEndpoint ne } out := &ingressEndpointOut{ - Id: ingressEndpoint.GetId(), - Name: ingressEndpoint.Spec.GetDisplayName(), - Gateway: ingressEndpoint.Spec.Gateway.GetId(), - Environment: ingressEndpoint.Spec.Environment.GetId(), - Phase: ingressEndpoint.Status.GetPhase(), + Id: ingressEndpoint.GetId(), + Name: ingressEndpoint.Spec.GetDisplayName(), + Gateway: ingressEndpoint.Spec.Gateway.GetId(), + Environment: ingressEndpoint.Spec.Environment.GetId(), + Phase: ingressEndpoint.Status.GetPhase(), + ErrorMessage: ingressEndpoint.Status.GetErrorMessage(), } if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus != nil { diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 47e0e9532a..742b184d8b 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -36,9 +36,9 @@ func (c *accessPointCommand) newIngressEndpointCreateCommand() *cobra.Command { } pcmd.AddCloudFlag(cmd) - cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint.") - cmd.Flags().String("private-endpoint-resource-id", "", "Resource ID of an Azure Private Endpoint.") - cmd.Flags().String("private-service-connect-connection-id", "", "ID of a GCP Private Service Connect connection.") + cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint; only valid with --cloud aws.") + cmd.Flags().String("private-endpoint-resource-id", "", "Resource ID of an Azure Private Endpoint; only valid with --cloud azure.") + cmd.Flags().String("private-service-connect-connection-id", "", "ID of a GCP Private Service Connect connection; only valid with --cloud gcp.") addGatewayFlag(cmd, c.AuthenticatedCLICommand) pcmd.AddContextFlag(cmd, c.CLICommand) pcmd.AddEnvironmentFlag(cmd, c.AuthenticatedCLICommand) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_list.go b/internal/network/command_access_point_private_link_ingress_endpoint_list.go index 005d93aaba..de404a30aa 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_list.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_list.go @@ -57,11 +57,12 @@ func (c *accessPointCommand) listIngressEndpoint(cmd *cobra.Command, _ []string) } out := &ingressEndpointOut{ - Id: ingressEndpoint.GetId(), - Name: ingressEndpoint.Spec.GetDisplayName(), - Gateway: ingressEndpoint.Spec.Gateway.GetId(), - Environment: ingressEndpoint.Spec.Environment.GetId(), - Phase: ingressEndpoint.Status.GetPhase(), + Id: ingressEndpoint.GetId(), + Name: ingressEndpoint.Spec.GetDisplayName(), + Gateway: ingressEndpoint.Spec.Gateway.GetId(), + Environment: ingressEndpoint.Spec.Environment.GetId(), + Phase: ingressEndpoint.Status.GetPhase(), + ErrorMessage: ingressEndpoint.Status.GetErrorMessage(), } if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus != nil { diff --git a/internal/network/command_gateway.go b/internal/network/command_gateway.go index 7636e20429..296c6b34c4 100644 --- a/internal/network/command_gateway.go +++ b/internal/network/command_gateway.go @@ -33,14 +33,12 @@ const ( var ( createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface", "ingress-private-service-connect"} - listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-privatelink", "gcp-ingress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} + listGatewayTypes = []string{"aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-private-service-connect", "gcp-ingress-private-service-connect"} gatewayTypeMap = map[string]string{ "aws-egress-privatelink": awsEgressPrivateLink, "aws-ingress-privatelink": awsIngressPrivateLink, "azure-egress-privatelink": azureEgressPrivateLink, "azure-ingress-privatelink": azureIngressPrivateLink, - "gcp-egress-privatelink": gcpEgressPrivateLink, - "gcp-ingress-privatelink": gcpIngressPrivateLink, "gcp-egress-private-service-connect": gcpEgressPrivateLink, "gcp-ingress-private-service-connect": gcpIngressPrivateLink, } @@ -53,7 +51,7 @@ type gatewayOut struct { Region string `human:"Region,omitempty" serialized:"region,omitempty"` Type string `human:"Type,omitempty" serialized:"type,omitempty"` AwsPrincipalArn string `human:"AWS Principal ARN,omitempty" serialized:"aws_principal_arn,omitempty"` - VpcEndpointServiceName string `human:"VPC Endpoint Service Name,omitempty" serialized:"vpc_endpoint_service_name,omitempty"` + VpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` AzureSubscription string `human:"Azure Subscription,omitempty" serialized:"azure_subscription,omitempty"` AzurePrivateLinkServiceAlias string `human:"Azure Private Link Service Alias,omitempty" serialized:"azure_private_link_service_alias,omitempty"` AzurePrivateLinkServiceResourceId string `human:"Azure Private Link Resource ID,omitempty" serialized:"azure_private_link_service_resource_id,omitempty"` diff --git a/internal/network/command_gateway_create.go b/internal/network/command_gateway_create.go index 6cc79b5203..69d9cc6d90 100644 --- a/internal/network/command_gateway_create.go +++ b/internal/network/command_gateway_create.go @@ -80,6 +80,10 @@ func (c *command) gatewayCreate(cmd *cobra.Command, args []string) error { return err } + if len(zones) > 0 && gatewayType != "private-network-interface" { + return fmt.Errorf("flag \"--zones\" is only valid for --type private-network-interface") + } + environmentId, err := c.Context.EnvironmentId() if err != nil { return err diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden index cf4d05729b..587ecae872 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden @@ -18,9 +18,9 @@ Create a GCP Private Service Connect ingress endpoint. Flags: --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". - --vpc-endpoint-id string ID of an AWS VPC endpoint. - --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint. - --private-service-connect-connection-id string ID of a GCP Private Service Connect connection. + --vpc-endpoint-id string ID of an AWS VPC endpoint; only valid with --cloud aws. + --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint; only valid with --cloud azure. + --private-service-connect-connection-id string ID of a GCP Private Service Connect connection; only valid with --cloud gcp. --gateway string REQUIRED: Gateway ID. --context string CLI context name. --environment string Environment ID. diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden index 264c50558e..0b93f267ae 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden @@ -17,9 +17,9 @@ Create a GCP Private Service Connect ingress endpoint. Flags: --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". - --vpc-endpoint-id string ID of an AWS VPC endpoint. - --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint. - --private-service-connect-connection-id string ID of a GCP Private Service Connect connection. + --vpc-endpoint-id string ID of an AWS VPC endpoint; only valid with --cloud aws. + --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint; only valid with --cloud azure. + --private-service-connect-connection-id string ID of a GCP Private Service Connect connection; only valid with --cloud gcp. --gateway string REQUIRED: Gateway ID. --context string CLI context name. --environment string Environment ID. diff --git a/test/fixtures/output/network/gateway/create-aws-ingress.golden b/test/fixtures/output/network/gateway/create-aws-ingress.golden index 49f2ea734d..cbd01f3f42 100644 --- a/test/fixtures/output/network/gateway/create-aws-ingress.golden +++ b/test/fixtures/output/network/gateway/create-aws-ingress.golden @@ -1,9 +1,9 @@ -+---------------------------+---------------------------------------------------------+ -| ID | gw-abc123 | -| Name | my-gateway | -| Environment | env-596 | -| Region | us-west-2 | -| Type | AwsIngressPrivateLink | -| VPC Endpoint Service Name | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | -| Phase | READY | -+---------------------------+---------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------+ +| ID | gw-abc123 | +| Name | my-gateway | +| Environment | env-596 | +| Region | us-west-2 | +| Type | AwsIngressPrivateLink | +| AWS VPC Endpoint Service Name | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | +| Phase | READY | ++-------------------------------+---------------------------------------------------------+ diff --git a/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden b/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden index 0708330c82..a6de6d99fc 100644 --- a/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden +++ b/test/fixtures/output/network/gateway/list-filter-azure-ingress-type.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+--------------------------+-------------+---------+-------------------------+-------------------+---------------------------+--------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- - gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+--------------------------+-------------+---------+-------------------------+-------------------+-------------------------------+--------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-11111 | my-azure-ingress-gateway | env-596 | eastus2 | AzureIngressPrivateLink | | | | azure-ingress-pl.eastus2.azure.privatelinkservice | /subscriptions/aa000000-a000-0a00-00aa-0000aaa0a0a0/resourceGroups/rg-1/providers/Microsoft.Network/privateLinkServices/azure-ingress-pl | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden b/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden index d3c04b5ab2..7a34018f11 100644 --- a/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden +++ b/test/fixtures/output/network/gateway/list-filter-gcp-ingress-type.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+------------------------+-------------+-------------+---------------------------------+-------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------+-------+-------+---------+---------------- - gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+------------------------+-------------+-------------+---------------------------------+-------------------+-------------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+-----------------------------------------------------------------------------------------------+-------+-------+---------+---------------- + gw-99999 | my-gcp-ingress-gateway | env-596 | us-central1 | GcpIngressPrivateServiceConnect | | | | | | | | projects/traffic-prod/regions/us-central1/serviceAttachments/plattg-abc123-service-attachment | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-id.golden b/test/fixtures/output/network/gateway/list-filter-id.golden index fdf3ed3dda..b9315188d2 100644 --- a/test/fixtures/output/network/gateway/list-filter-id.golden +++ b/test/fixtures/output/network/gateway/list-filter-id.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+-------------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-multiple.golden b/test/fixtures/output/network/gateway/list-filter-multiple.golden index fdf3ed3dda..b9315188d2 100644 --- a/test/fixtures/output/network/gateway/list-filter-multiple.golden +++ b/test/fixtures/output/network/gateway/list-filter-multiple.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+-------------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-name.golden b/test/fixtures/output/network/gateway/list-filter-name.golden index 811020907b..49521cf7f2 100644 --- a/test/fixtures/output/network/gateway/list-filter-name.golden +++ b/test/fixtures/output/network/gateway/list-filter-name.golden @@ -1,5 +1,5 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+----------------+-------------+-----------+----------------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+------------------------+--------------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | - gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------------+--------------------------------+-------------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+------------------------+--------------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + gw-23456 | my-aws-gateway | env-596 | us-east-2 | AwsPrivateNetworkInterface | | | | | | | | | READY | us-east-2a, us-east-2b | 000000000000 | diff --git a/test/fixtures/output/network/gateway/list-filter-phase.golden b/test/fixtures/output/network/gateway/list-filter-phase.golden index 121ebf0f93..88b211c7b1 100644 --- a/test/fixtures/output/network/gateway/list-filter-phase.golden +++ b/test/fixtures/output/network/gateway/list-filter-phase.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | | | project-12345 | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-region.golden b/test/fixtures/output/network/gateway/list-filter-region.golden index fdf3ed3dda..b9315188d2 100644 --- a/test/fixtures/output/network/gateway/list-filter-region.golden +++ b/test/fixtures/output/network/gateway/list-filter-region.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+-------------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-filter-type.golden b/test/fixtures/output/network/gateway/list-filter-type.golden index fdf3ed3dda..b9315188d2 100644 --- a/test/fixtures/output/network/gateway/list-filter-type.golden +++ b/test/fixtures/output/network/gateway/list-filter-type.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message - | | | | | | | | Alias | | | | | | | | ------------+----------------+-------------+-----------+----------------------+--------------------------------+---------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- - gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + | | | | | | | | Alias | | | | | | | | +-----------+----------------+-------------+-----------+----------------------+--------------------------------+-------------------------------+--------------------+--------------------------------+--------------------------------+-------------------+-------------+----------------------------+-------+-------+---------+---------------- + gw-12345 | my-aws-gateway | env-596 | us-east-1 | AwsEgressPrivateLink | arn:aws:iam::123456789012:role | | | | | | | | READY | | | diff --git a/test/fixtures/output/network/gateway/list-help.golden b/test/fixtures/output/network/gateway/list-help.golden index 9657ebcb4b..6f5b5a3386 100644 --- a/test/fixtures/output/network/gateway/list-help.golden +++ b/test/fixtures/output/network/gateway/list-help.golden @@ -4,7 +4,7 @@ Usage: confluent network gateway list [flags] Flags: - --types strings A comma-separated list of gateway types: "aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-privatelink", "gcp-ingress-privatelink", "gcp-egress-private-service-connect", or "gcp-ingress-private-service-connect". + --types strings A comma-separated list of gateway types: "aws-egress-privatelink", "aws-ingress-privatelink", "azure-egress-privatelink", "azure-ingress-privatelink", "gcp-egress-private-service-connect", or "gcp-ingress-private-service-connect". --id strings A comma-separated list of gateway IDs. --region strings A comma-separated list of regions. --display-name strings A comma-separated list of display names. diff --git a/test/fixtures/output/network/gateway/list-json.golden b/test/fixtures/output/network/gateway/list-json.golden index 29aaeb8b2e..ec7510acd7 100644 --- a/test/fixtures/output/network/gateway/list-json.golden +++ b/test/fixtures/output/network/gateway/list-json.golden @@ -77,7 +77,7 @@ "environment": "env-596", "region": "us-west-2", "type": "AwsIngressPrivateLink", - "vpc_endpoint_service_name": "com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000", + "aws_vpc_endpoint_service_name": "com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000", "phase": "READY" }, { diff --git a/test/fixtures/output/network/gateway/list.golden b/test/fixtures/output/network/gateway/list.golden index 121ebf0f93..88b211c7b1 100644 --- a/test/fixtures/output/network/gateway/list.golden +++ b/test/fixtures/output/network/gateway/list.golden @@ -1,4 +1,4 @@ - ID | Name | Environment | Region | Type | AWS Principal ARN | VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message + ID | Name | Environment | Region | Type | AWS Principal ARN | AWS VPC Endpoint Service Name | Azure Subscription | Azure Private Link Service | Azure Private Link Resource ID | GCP IAM Principal | GCP Project | GCP PSC Service Attachment | Phase | Zones | Account | Error Message | | | | | | | | Alias | | | | | | | | -----------+--------------------------+-------------+-------------+---------------------------------+--------------------------------+---------------------------------------------------------+--------------------------------------+---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------+---------------+-----------------------------------------------------------------------------------------------+-------+------------------------+--------------+---------------- gw-07531 | my-gcp-gateway | env-596 | eastus | GcpEgressPrivateServiceConnect | | | | | | | project-12345 | | READY | | | From 1386799e812e059602bde90a1547d944d41e9161 Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 5 May 2026 18:23:01 -0500 Subject: [PATCH 15/18] Remove dev artifact markdown files from repo root Co-Authored-By: Claude Sonnet 4.6 (1M context) --- GCP_AZURE_INGRESS_MANUAL_TEST.md | 347 -------------------------- GCP_INGRESS_IMPLEMENTATION_PLAN.md | 380 ----------------------------- 2 files changed, 727 deletions(-) delete mode 100644 GCP_AZURE_INGRESS_MANUAL_TEST.md delete mode 100644 GCP_INGRESS_IMPLEMENTATION_PLAN.md diff --git a/GCP_AZURE_INGRESS_MANUAL_TEST.md b/GCP_AZURE_INGRESS_MANUAL_TEST.md deleted file mode 100644 index 26fae5965e..0000000000 --- a/GCP_AZURE_INGRESS_MANUAL_TEST.md +++ /dev/null @@ -1,347 +0,0 @@ -# GCP IngressPrivateServiceConnect & Azure IngressPrivateLink CLI Testing - -Corresponding PR: #3283 Add Azure and GCP ingress access point and gateway support - -## Prerequisites - -``` -dist/confluent_darwin_arm64_v8.0/confluent login --url stag.cpdev.cloud --organization 94b47aa0-ed3a-44da-9460-6cec0c710e84 --save -``` - ---- - -## Test Checklist - -### Gateways - -- [x] **1. Create Azure ingress gateway** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway create test-azure-ingress --cloud azure --region centralus --type ingress-privatelink -+-------------+-------------------------+ -| ID | gw-stgc6dj0d2 | -| Name | test-azure-ingress | -| Environment | env-stgcznd2qz | -| Region | centralus | -| Type | AzureIngressPrivateLink | -| Phase | PROVISIONING | -+-------------+-------------------------+ -``` -Expected: gateway created, `Type: AzureIngressPrivateLink`, phase `PROVISIONING` ✅ - -- [x] **2. Create GCP ingress gateway** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway create test-gcp-ingress --cloud gcp --region us-central1 --type ingress-private-service-connect -+-------------+---------------------------------+ -| ID | gw-stgco5rq5v | -| Name | test-gcp-ingress | -| Environment | env-stgcznd2qz | -| Region | us-central1 | -| Type | GcpIngressPrivateServiceConnect | -| Phase | PROVISIONING | -+-------------+---------------------------------+ -``` -Expected: gateway created, `Type: GcpIngressPrivateServiceConnect`, phase `PROVISIONING` ✅ - -- [x] **3. Describe Azure gateway** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway describe gw-stgc6dj0d2 -+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ID | gw-stgc6dj0d2 | -| Name | test-azure-ingress | -| Environment | env-stgcznd2qz | -| Region | centralus | -| Type | AzureIngressPrivateLink | -| Azure Private Link Service | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | -| Alias | | -| Azure Private Link Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | -| Phase | CREATED | -+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -``` -Expected: `Azure Private Link Service Alias` and `Azure Private Link Resource ID` populated ✅ - -- [x] **4. Describe GCP gateway** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway describe gw-stgco5rq5v -+----------------------------+---------------------------------------------------------------------------------------------------+ -| ID | gw-stgco5rq5v | -| Name | test-gcp-ingress | -| Environment | env-stgcznd2qz | -| Region | us-central1 | -| Type | GcpIngressPrivateServiceConnect | -| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | -| Phase | CREATED | -+----------------------------+---------------------------------------------------------------------------------------------------+ -``` -Expected: `GCP PSC Service Attachment` populated ✅ - -- [x] **5. Filter by Azure ingress type** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway list --types azure-ingress-privatelink --output yaml -- id: gw-stgc1q5k9v - name: test-azure-ingress-gateway-updated - environment: env-stgcznd2qz - region: centralus - type: AzureIngressPrivateLink - azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice - azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink - phase: READY -- id: gw-stgc6dj0d2 - name: test-azure-ingress - environment: env-stgcznd2qz - region: centralus - type: AzureIngressPrivateLink - azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice - azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink - phase: CREATED -``` -Expected: only Azure ingress gateways returned ✅ - -- [x] **6. Filter by GCP ingress type** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway list --types gcp-ingress-private-service-connect --output yaml -- id: gw-stgc6ed3l2 - name: test-gcp-ingress-gateway-updated - environment: env-stgcznd2qz - region: us-central1 - type: GcpIngressPrivateServiceConnect - gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment - phase: READY -- id: gw-stgco5rq5v - name: test-gcp-ingress - environment: env-stgcznd2qz - region: us-central1 - type: GcpIngressPrivateServiceConnect - gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment - phase: CREATED -``` -Expected: only GCP ingress gateways returned ✅ - -- [x] **7. Filter by both types** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network gateway list --types azure-ingress-privatelink,gcp-ingress-private-service-connect --output yaml -- id: gw-stgc1q5k9v - name: test-azure-ingress-gateway-updated - environment: env-stgcznd2qz - region: centralus - type: AzureIngressPrivateLink - azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice - azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink - phase: READY -- id: gw-stgc6dj0d2 - name: test-azure-ingress - environment: env-stgcznd2qz - region: centralus - type: AzureIngressPrivateLink - azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice - azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink - phase: CREATED -- id: gw-stgc6ed3l2 - name: test-gcp-ingress-gateway-updated - environment: env-stgcznd2qz - region: us-central1 - type: GcpIngressPrivateServiceConnect - gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment - phase: READY -- id: gw-stgco5rq5v - name: test-gcp-ingress - environment: env-stgcznd2qz - region: us-central1 - type: GcpIngressPrivateServiceConnect - gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment - phase: CREATED -``` -Expected: both Azure and GCP ingress gateways returned ✅ - ---- - -### Access Points - -- [x] **8. Create Azure ingress access point** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint create \ - --cloud azure \ - --gateway gw-stgc6dj0d2 \ - --private-endpoint-resource-id /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli -+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ID | ap-stgcdnlrn4 | -| Environment | env-stgcznd2qz | -| Gateway | gw-stgc6dj0d2 | -| Phase | PROVISIONING | -| Azure Private Link Service Alias | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | -| Azure Private Link Service Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | -| Azure Private Endpoint Resource ID | /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli | -| DNS Domain | apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud | -+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -``` -Expected: access point created, `Azure Private Endpoint Resource ID` and `DNS Domain` populated ✅ - -- [x] **9. Create GCP ingress access point** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint create \ - --cloud gcp \ - --gateway gw-stgco5rq5v \ - --private-service-connect-connection-id 8345469524639756 -+----------------------------+---------------------------------------------------------------------------------------------------+ -| ID | ap-stgc4w0oo8 | -| Environment | env-stgcznd2qz | -| Gateway | gw-stgco5rq5v | -| Phase | PROVISIONING | -| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | -| GCP PSC Connection ID | 8345469524639756 | -| DNS Domain | apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud | -+----------------------------+---------------------------------------------------------------------------------------------------+ - -``` -Expected: access point created, `GCP PSC Connection ID` and `DNS Domain` populated ✅ - -- [x] **10. Verify cross-cloud flag rejection** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint create \ - --cloud gcp \ - --gateway gw-stgco5rq5v \ - --private-endpoint-resource-id /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli -Error: "--vpc-endpoint-id" and "--private-endpoint-resource-id" are not valid for --cloud gcp; use "--private-service-connect-connection-id" -``` -Expected: error `"--private-endpoint-resource-id" is not valid for --cloud gcp` ✅ - -- [x] **11. Update access point** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint update ap-stgcdnlrn4 --name my-azure-ingress-ap -+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ID | ap-stgcdnlrn4 | -| Name | my-azure-ingress-ap | -| Environment | env-stgcznd2qz | -| Gateway | gw-stgc6dj0d2 | -| Phase | READY | -| Azure Private Link Service Alias | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | -| Azure Private Link Service Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | -| Azure Private Endpoint Resource ID | /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli | -| DNS Domain | apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud | -+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint update ap-stgc4w0oo8 --name my-gcp-ingress-ap -+----------------------------+---------------------------------------------------------------------------------------------------+ -| ID | ap-stgc4w0oo8 | -| Name | my-gcp-ingress-ap | -| Environment | env-stgcznd2qz | -| Gateway | gw-stgco5rq5v | -| Phase | READY | -| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | -| GCP PSC Connection ID | 8345469524639756 | -| DNS Domain | apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud | -+----------------------------+---------------------------------------------------------------------------------------------------+ -``` -Expected: name updated, other fields unchanged ✅ - -- [x] **12. Describe Azure access point** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint describe ap-stgcdnlrn4 -+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ID | ap-stgcdnlrn4 | -| Name | my-azure-ingress-ap | -| Environment | env-stgcznd2qz | -| Gateway | gw-stgc6dj0d2 | -| Phase | READY | -| Azure Private Link Service Alias | plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice | -| Azure Private Link Service Resource ID | /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink | -| Azure Private Endpoint Resource ID | /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli | -| DNS Domain | apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud | -+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -``` -Expected: `Azure Private Link Service Alias`, `Azure Private Endpoint Resource ID`, `DNS Domain` populated ✅ - -- [x] **13. Describe GCP access point** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint describe ap-stgc4w0oo8 -+----------------------------+---------------------------------------------------------------------------------------------------+ -| ID | ap-stgc4w0oo8 | -| Name | my-gcp-ingress-ap | -| Environment | env-stgcznd2qz | -| Gateway | gw-stgco5rq5v | -| Phase | READY | -| GCP PSC Service Attachment | projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment | -| GCP PSC Connection ID | 8345469524639756 | -| DNS Domain | apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud | -+----------------------------+---------------------------------------------------------------------------------------------------+ -``` -Expected: `GCP PSC Service Attachment`, `GCP PSC Connection ID`, `DNS Domain` populated ✅ - -- [x] **14. List all access points** -``` -$ dist/confluent_darwin_arm64_v8.0/confluent network access-point private-link ingress-endpoint list --output yaml -- id: ap-stgc4pwgn8 - name: test-azure-ingress-ap-updated - environment: env-stgcznd2qz - gateway: gw-stgc1q5k9v - phase: READY - azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice - azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink - azure_private_endpoint_resource_id: /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing - dns_domain: apstgc4pwgn8.centralus.azure.accesspoint.stag.cpdev.cloud -- id: ap-stgc4w0oo8 - name: my-gcp-ingress-ap - environment: env-stgcznd2qz - gateway: gw-stgco5rq5v - phase: READY - gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment - gcp_private_service_connect_connection_id: "8345469524639756" - dns_domain: apstgc4w0oo8.us-central1.gcp.accesspoint.stag.cpdev.cloud -- id: ap-stgcdnlnn4 - name: test-gcp-ingress-ap-updated - environment: env-stgcznd2qz - gateway: gw-stgc6ed3l2 - phase: READY - gcp_private_service_connect_service_attachment: projects/traffic-stag/regions/us-central1/serviceAttachments/plattg-stgcwplnlg-service-attachment - gcp_private_service_connect_connection_id: "8345469524639755" - dns_domain: apstgcdnlnn4.us-central1.gcp.accesspoint.stag.cpdev.cloud -- id: ap-stgcdnlrn4 - name: my-azure-ingress-ap - environment: env-stgcznd2qz - gateway: gw-stgc6dj0d2 - phase: READY - azure_private_link_service_alias: plattg-stgc56xrj6-privatelink.54b70a2e-b341-41df-bb6c-fbb01bf7c481.centralus.azure.privatelinkservice - azure_private_link_service_resource_id: /subscriptions/3c0d5cd7-137e-48bb-80ba-d2b7d177986f/resourceGroups/plattg-stgc56xrj6/providers/Microsoft.Network/privateLinkServices/plattg-stgc56xrj6-privatelink - azure_private_endpoint_resource_id: /subscriptions/26812801-9a17-44c2-8398-a2e2ab4eb803/resourcegroups/richard-testing/providers/Microsoft.Network/privateEndpoints/testing-cli - dns_domain: apstgcdnlrn4.centralus.azure.accesspoint.stag.cpdev.cloud -``` -Expected: Azure and GCP access points listed with correct cloud-specific fields ✅ - ---- - -### Automated Tests - -- [x] **15. Integration tests** -``` -$ make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestNetworkGateway" -ok github.com/confluentinc/cli/v4/test 8.344s - -$ make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestNetworkAccessPointPrivateLinkIngressEndpoint" -ok github.com/confluentinc/cli/v4/test 6.327s - -$ make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestHelp" -ok github.com/confluentinc/cli/v4/test 135.274s -``` -Expected: all pass ✅ - ---- - -## Results - -| # | Test | Result | Notes | -|---|------|--------|-------| -| 1 | Create Azure gateway | ✅ Pass | | -| 2 | Create GCP gateway | ✅ Pass | | -| 3 | Describe Azure gateway | ✅ Pass | Phase: CREATED, Azure PL Service Alias and Resource ID populated | -| 4 | Describe GCP gateway | ✅ Pass | Phase: CREATED, GCP PSC Service Attachment populated | -| 5 | Filter Azure ingress type | ✅ Pass | | -| 6 | Filter GCP ingress type | ✅ Pass | Original map values restored after manual testing revealed API expects "GcpIngressPrivateLink" not "GcpIngressPrivateServiceConnect" | -| 7 | Filter both types | ✅ Pass | | -| 8 | Create Azure access point | ✅ Pass | ap-stgcdnlrn4, Phase: READY | -| 9 | Create GCP access point | ✅ Pass | ap-stgc4w0oo8, Phase: READY | -| 10 | Cross-cloud flag rejection | ✅ Pass | Fixed check order so cross-cloud message shows before required message | -| 11 | Update access point | ✅ Pass | | -| 12 | Describe Azure access point | ✅ Pass | | -| 13 | Describe GCP access point | ✅ Pass | | -| 14 | List access points | ✅ Pass | | -| 15 | Automated tests | ✅ Pass | | diff --git a/GCP_INGRESS_IMPLEMENTATION_PLAN.md b/GCP_INGRESS_IMPLEMENTATION_PLAN.md deleted file mode 100644 index bc086f1450..0000000000 --- a/GCP_INGRESS_IMPLEMENTATION_PLAN.md +++ /dev/null @@ -1,380 +0,0 @@ -# GCP Ingress Private Link Implementation Plan - -## Overview -Add GCP support for ingress private link endpoints, following the pattern established by AWS ingress implementation (commit 31b97e2). - -## Prerequisites -- [ ] Verify SDK has `NetworkingV1GcpIngressPrivateServiceConnectEndpoint` types -- [ ] Check if SDK version needs to be updated for GCP ingress support -- [ ] Confirm GCP ingress gateway types exist in `networking-gateway` SDK - ---- - -## Step 1: SDK Version Check -**Goal:** Ensure SDK has the necessary GCP ingress types - -**Tasks:** -1. Check current SDK version in `go.mod` -2. Search for GCP ingress types in SDK: - - `NetworkingV1GcpIngressPrivateServiceConnectEndpoint` - - `NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus` - - `NetworkingV1GcpIngressPrivateServiceConnectGatewaySpec` -3. Update SDK versions if needed (like AWS did: networking-access-point v0.5.0 → v0.8.0) - -**Files to check:** -- `go.mod` -- SDK documentation/types - ---- - -## Step 2: Update Ingress Endpoint Output Struct -**File:** `internal/network/command_access_point_private_link_ingress_endpoint.go` - -**Changes:** -Add GCP-specific fields to `ingressEndpointOut` struct (around line 17-26): - -```go -type ingressEndpointOut struct { - Id string `human:"ID" serialized:"id"` - Name string `human:"Name,omitempty" serialized:"name,omitempty"` - Environment string `human:"Environment" serialized:"environment"` - Gateway string `human:"Gateway" serialized:"gateway"` - Phase string `human:"Phase" serialized:"phase"` - - // AWS fields - AwsVpcEndpointId string `human:"AWS VPC Endpoint ID,omitempty" serialized:"aws_vpc_endpoint_id,omitempty"` - AwsVpcEndpointServiceName string `human:"AWS VPC Endpoint Service Name,omitempty" serialized:"aws_vpc_endpoint_service_name,omitempty"` - DnsDomain string `human:"DNS Domain,omitempty" serialized:"dns_domain,omitempty"` - - // GCP fields (ADD THESE - based on egress pattern) - GcpPrivateServiceConnectServiceAttachment string `human:"GCP Private Service Connect Service Attachment,omitempty" serialized:"gcp_private_service_connect_service_attachment,omitempty"` - GcpPrivateServiceConnectConnectionId string `human:"GCP Private Service Connect Connection ID,omitempty" serialized:"gcp_private_service_connect_connection_id,omitempty"` - GcpPrivateServiceConnectEndpointIpAddress string `human:"GCP Private Service Connect Endpoint IP Address,omitempty" serialized:"gcp_private_service_connect_endpoint_ip_address,omitempty"` -} -``` - -**Note:** Field names should match what the GCP ingress SDK types provide. - ---- - -## Step 3: Update Create Command -**File:** `internal/network/command_access_point_private_link_ingress_endpoint_create.go` - -### 3.1 Update Command Flags (around line 29-39) -```go -pcmd.AddCloudFlag(cmd) // Change from AddCloudAwsFlag to support all clouds -cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint.") -cmd.Flags().String("psc-connection-id", "", "ID of a GCP Private Service Connect connection.") // ADD THIS - -cobra.CheckErr(cmd.MarkFlagRequired("cloud")) -cobra.CheckErr(cmd.MarkFlagRequired("gateway")) -// Make vpc-endpoint-id conditional, not always required -``` - -### 3.2 Update Examples (around line 22-27) -Add GCP example: -```go -examples.Example{ - Text: "Create a GCP Private Service Connect ingress endpoint.", - Code: "confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --psc-connection-id ", -}, -``` - -### 3.3 Update createIngressEndpoint function (around line 82-92) -Add GCP case to switch statement: -```go -switch cloud { -case pcloud.Aws: - createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ - NetworkingV1AwsIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AwsIngressPrivateLinkEndpoint{ - Kind: "AwsIngressPrivateLinkEndpoint", - VpcEndpointId: vpcEndpointId, - }, - } -case pcloud.Gcp: // ADD THIS CASE - pscConnectionId, err := cmd.Flags().GetString("psc-connection-id") - if err != nil { - return err - } - createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ - NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ - Kind: "GcpIngressPrivateServiceConnectEndpoint", - PrivateServiceConnectConnectionId: pscConnectionId, // Verify field name in SDK - }, - } -default: - return fmt.Errorf("ingress endpoints are only supported for AWS and GCP") -} -``` - -### 3.4 Add Flag Validation -Add logic to require the right flag for each cloud: -```go -// After getting cloud flag -if cloud == pcloud.Aws { - cobra.CheckErr(cmd.MarkFlagRequired("vpc-endpoint-id")) -} else if cloud == pcloud.Gcp { - cobra.CheckErr(cmd.MarkFlagRequired("psc-connection-id")) -} -``` - ---- - -## Step 4: Update List Command -**File:** `internal/network/command_access_point_private_link_ingress_endpoint_list.go` - -### 4.1 Update Filter Logic (around line 571-573) -Change from AWS-only filter to include GCP: -```go -for _, ingressEndpoint := range ingressEndpoints { - if ingressEndpoint.Spec == nil { - return fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "spec") - } - - // Filter to include both AWS and GCP ingress endpoints - config := ingressEndpoint.Spec.GetConfig() - if config.NetworkingV1AwsIngressPrivateLinkEndpoint == nil && - config.NetworkingV1GcpIngressPrivateServiceConnectEndpoint == nil { - continue // Skip if neither AWS nor GCP ingress endpoint - } - - if ingressEndpoint.Status == nil { - return fmt.Errorf(errors.CorruptedNetworkResponseErrorMsg, "status") - } - - // ... rest of the code -} -``` - -### 4.2 Add GCP Status Extraction (around line 586-592) -```go -// Existing AWS status extraction -if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus != nil { - out.AwsVpcEndpointId = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetVpcEndpointId() - out.AwsVpcEndpointServiceName = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetVpcEndpointServiceName() - if ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.HasDnsDomain() { - out.DnsDomain = ingressEndpoint.Status.Config.NetworkingV1AwsIngressPrivateLinkEndpointStatus.GetDnsDomain() - } -} - -// ADD GCP status extraction -if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { - out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() - out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() - out.GcpPrivateServiceConnectEndpointIpAddress = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectEndpointIpAddress() -} -``` - -**Note:** Verify actual method names in SDK (GetPrivateServiceConnectServiceAttachment, etc.) - ---- - -## Step 5: Update Print Function -**File:** `internal/network/command_access_point_private_link_ingress_endpoint.go` - -### 5.1 Update printPrivateLinkIngressEndpointTable (around line 282-293) -Add GCP status extraction (same as Step 4.2 above): -```go -// After AWS status extraction, add: -if ingressEndpoint.Status.Config != nil && ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus != nil { - out.GcpPrivateServiceConnectServiceAttachment = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectServiceAttachment() - out.GcpPrivateServiceConnectConnectionId = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectConnectionId() - out.GcpPrivateServiceConnectEndpointIpAddress = ingressEndpoint.Status.Config.NetworkingV1GcpIngressPrivateServiceConnectEndpointStatus.GetPrivateServiceConnectEndpointIpAddress() -} -``` - ---- - -## Step 6: Update Autocomplete -**File:** `internal/network/command_access_point_private_link_ingress_endpoint.go` - -### 6.1 Update autocompleteIngressEndpoints (around line 255-257) -Change filter to include GCP: -```go -ingressEndpoints := slices.DeleteFunc(accessPoints, func(accessPoint networkingaccesspointv1.NetworkingV1AccessPoint) bool { - config := accessPoint.Spec.GetConfig() - return config.NetworkingV1AwsIngressPrivateLinkEndpoint == nil && - config.NetworkingV1GcpIngressPrivateServiceConnectEndpoint == nil -}) -``` - ---- - -## Step 7: Gateway Support (If Needed) -**Files:** -- `internal/network/command_gateway.go` -- `internal/network/command_gateway_create.go` -- `internal/network/command_gateway_list.go` - -### 7.1 Check if GCP Ingress Gateways Exist -Determine if GCP has ingress-specific gateway types or if existing GCP egress gateway handles both. - -### 7.2 If GCP Ingress Gateways Are Separate: - -**command_gateway.go:** -```go -const ( - awsEgressPrivateLink = "AwsEgressPrivateLink" - awsIngressPrivateLink = "AwsIngressPrivateLink" - gcpEgressPrivateServiceConnect = "GcpEgressPrivateServiceConnect" - gcpIngressPrivateServiceConnect = "GcpIngressPrivateServiceConnect" // ADD THIS - // ... -) - -var ( - createGatewayTypes = []string{"egress-privatelink", "ingress-privatelink", "private-network-interface"} - listGatewayTypes = []string{ - "aws-egress-privatelink", - "aws-ingress-privatelink", - "azure-egress-privatelink", - "gcp-egress-private-service-connect", - "gcp-ingress-private-service-connect", // ADD THIS - } - gatewayTypeMap = map[string]string{ - "aws-egress-privatelink": awsEgressPrivateLink, - "aws-ingress-privatelink": awsIngressPrivateLink, - "azure-egress-privatelink": azureEgressPrivateLink, - "gcp-egress-private-service-connect": gcpEgressPrivateServiceConnect, - "gcp-ingress-private-service-connect": gcpIngressPrivateServiceConnect, // ADD THIS - } -) -``` - -Add GCP ingress fields to `gatewayOut` struct and update: -- `getGatewayCloud()` to recognize GCP ingress gateways -- `getGatewayType()` to identify GCP ingress type -- `printGatewayTable()` to extract GCP ingress gateway details - -**command_gateway_create.go:** -Add GCP ingress case to gateway creation (similar to AWS ingress pattern) - -**command_gateway_list.go:** -Add GCP ingress handling in list output - ---- - -## Step 8: Update Tests -**Files:** -- `test/network_test.go` -- `test/test-server/networking_handlers.go` -- Test fixtures in `test/fixtures/output/network/access-point/private-link/ingress-endpoint/` - -### 8.1 Add Test Cases (test/network_test.go) -Around line 1170-1175, add GCP test cases: -```go -{args: "network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-12345 --psc-connection-id psc-abc123", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp.golden"}, -{args: "network access-point private-link ingress-endpoint create my-gcp-ingress --cloud gcp --gateway gw-12345 --psc-connection-id psc-abc123", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp-name.golden"}, -{args: "network access-point private-link ingress-endpoint describe ap-77777", fixture: "network/access-point/private-link/ingress-endpoint/describe-gcp.golden"}, -{args: "network access-point private-link ingress-endpoint describe ap-77777 --output json", fixture: "network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden"}, -``` - -### 8.2 Add Mock Server Handlers (test/test-server/networking_handlers.go) -Create GCP ingress endpoint mock responses similar to AWS: -- Mock access point with GCP ingress config -- Mock status responses with GCP-specific fields - -### 8.3 Create Golden Files -Create expected output fixtures: -- `create-gcp.golden` -- `create-gcp-name.golden` -- `describe-gcp.golden` -- `describe-gcp-json.golden` -- Update `list.golden` and `list-json.golden` to include GCP entries - -### 8.4 Update Gateway Tests (if applicable) -Add GCP ingress gateway tests if implementing gateway support - ---- - -## Step 9: Update Documentation/Examples - -### 9.1 Update Help Text -Ensure command help shows both AWS and GCP are supported - -### 9.2 Update Error Messages -Change "only supported for AWS" to "supported for AWS and GCP" - ---- - -## Step 10: Validation & Testing - -### 10.1 Pre-commit Checklist -- [ ] All tests pass: `go test ./...` -- [ ] Build succeeds: `go build` -- [ ] Linting passes -- [ ] Manual testing with test server - -### 10.2 Integration Testing -- [ ] Test GCP ingress endpoint create -- [ ] Test GCP ingress endpoint list -- [ ] Test GCP ingress endpoint describe -- [ ] Test GCP ingress endpoint update -- [ ] Test GCP ingress endpoint delete -- [ ] Test mixed AWS/GCP ingress endpoint list -- [ ] Test autocomplete with GCP endpoints -- [ ] Test GCP ingress gateway (if applicable) - -### 10.3 Edge Cases -- [ ] Test with invalid GCP connection IDs -- [ ] Test with missing required flags -- [ ] Test output formats (JSON, YAML) -- [ ] Test error handling for API failures - ---- - -## Open Questions to Resolve - -1. **SDK Field Names:** What are the exact field names in the GCP ingress SDK types? - - PrivateServiceConnectConnectionId? - - PrivateServiceConnectServiceAttachment? - - Check SDK documentation - -2. **Gateway Support:** Does GCP have separate ingress gateway types or does the existing GCP egress gateway handle both directions? - -3. **Required Fields:** What fields are required for GCP ingress endpoint creation? - - Just connection ID? - - Any additional configuration? - -4. **Status Fields:** What status information does GCP ingress return? - - Connection ID, IP address, service attachment? - - DNS/domain information? - -5. **Feature Flag:** Should GCP ingress be behind the same feature flag as AWS ingress, or a separate one? - ---- - -## Files Summary - -### Files to Modify: -1. `go.mod` (if SDK update needed) -2. `internal/network/command_access_point_private_link_ingress_endpoint.go` -3. `internal/network/command_access_point_private_link_ingress_endpoint_create.go` -4. `internal/network/command_access_point_private_link_ingress_endpoint_list.go` -5. `internal/network/command_gateway.go` (if GCP ingress gateways exist) -6. `internal/network/command_gateway_create.go` (if GCP ingress gateways exist) -7. `internal/network/command_gateway_list.go` (if GCP ingress gateways exist) -8. `test/network_test.go` -9. `test/test-server/networking_handlers.go` - -### Files to Create: -1. Test fixture golden files for GCP ingress endpoints - ---- - -## Estimated Effort - -- **Step 1 (SDK Check):** 30 minutes -- **Steps 2-6 (Core Implementation):** 2-3 hours -- **Step 7 (Gateway Support):** 1-2 hours (if needed) -- **Steps 8-9 (Tests & Docs):** 2-3 hours -- **Step 10 (Validation):** 1-2 hours - -**Total:** 6-11 hours depending on gateway requirements - ---- - -## References - -- AWS Ingress Commit: `31b97e26297183ae99b24f71b6b554d2295a7bc7` -- AWS Implementation pattern in `command_access_point_private_link_ingress_endpoint_*.go` -- GCP Egress Implementation pattern in `command_access_point_private_link_egress_endpoint_*.go` From 41ddd4e6b6f20320587628efdaaf8998219255ba Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Tue, 5 May 2026 18:48:29 -0500 Subject: [PATCH 16/18] Fix CLI lint: rename long flags and move required flag before optional flags - Rename --private-endpoint-resource-id to --endpoint-resource-id (20 chars, 2 hyphens) - Rename --private-service-connect-connection-id to --psc-connection-id (17 chars, 2 hyphens) - Move addGatewayFlag before optional flags so required --gateway is listed first Co-Authored-By: Claude Sonnet 4.6 (1M context) --- ...nt_private_link_ingress_endpoint_create.go | 28 +++++++++---------- .../ingress-endpoint/create-help.golden | 20 ++++++------- .../create-two-cloud-flags.golden | 22 +++++++-------- .../create-wrong-cloud-flag.golden | 2 +- test/network_test.go | 6 ++-- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/internal/network/command_access_point_private_link_ingress_endpoint_create.go b/internal/network/command_access_point_private_link_ingress_endpoint_create.go index 742b184d8b..a4d18e25b6 100644 --- a/internal/network/command_access_point_private_link_ingress_endpoint_create.go +++ b/internal/network/command_access_point_private_link_ingress_endpoint_create.go @@ -26,27 +26,27 @@ func (c *accessPointCommand) newIngressEndpointCreateCommand() *cobra.Command { }, examples.Example{ Text: "Create an Azure Private Link ingress endpoint.", - Code: "confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", + Code: "confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", }, examples.Example{ Text: "Create a GCP Private Service Connect ingress endpoint.", - Code: "confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --private-service-connect-connection-id 111111111111111111", + Code: "confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --psc-connection-id 111111111111111111", }, ), } pcmd.AddCloudFlag(cmd) - cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint; only valid with --cloud aws.") - cmd.Flags().String("private-endpoint-resource-id", "", "Resource ID of an Azure Private Endpoint; only valid with --cloud azure.") - cmd.Flags().String("private-service-connect-connection-id", "", "ID of a GCP Private Service Connect connection; only valid with --cloud gcp.") addGatewayFlag(cmd, c.AuthenticatedCLICommand) + cmd.Flags().String("vpc-endpoint-id", "", "ID of an AWS VPC endpoint; only valid with --cloud aws.") + cmd.Flags().String("endpoint-resource-id", "", "Resource ID of an Azure Private Endpoint; only valid with --cloud azure.") + cmd.Flags().String("psc-connection-id", "", "ID of a GCP Private Service Connect connection; only valid with --cloud gcp.") pcmd.AddContextFlag(cmd, c.CLICommand) pcmd.AddEnvironmentFlag(cmd, c.AuthenticatedCLICommand) pcmd.AddOutputFlag(cmd) cobra.CheckErr(cmd.MarkFlagRequired("cloud")) cobra.CheckErr(cmd.MarkFlagRequired("gateway")) - cmd.MarkFlagsMutuallyExclusive("vpc-endpoint-id", "private-endpoint-resource-id", "private-service-connect-connection-id") + cmd.MarkFlagsMutuallyExclusive("vpc-endpoint-id", "endpoint-resource-id", "psc-connection-id") return cmd } @@ -73,12 +73,12 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st return err } - privateEndpointResourceId, err := cmd.Flags().GetString("private-endpoint-resource-id") + endpointResourceId, err := cmd.Flags().GetString("endpoint-resource-id") if err != nil { return err } - privateServiceConnectConnectionId, err := cmd.Flags().GetString("private-service-connect-connection-id") + pscConnectionId, err := cmd.Flags().GetString("psc-connection-id") if err != nil { return err } @@ -111,23 +111,23 @@ func (c *accessPointCommand) createIngressEndpoint(cmd *cobra.Command, args []st }, } case pcloud.Azure: - if privateEndpointResourceId == "" { - return fmt.Errorf("flag \"private-endpoint-resource-id\" is required for --cloud azure") + if endpointResourceId == "" { + return fmt.Errorf("flag \"endpoint-resource-id\" is required for --cloud azure") } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1AzureIngressPrivateLinkEndpoint: &networkingaccesspointv1.NetworkingV1AzureIngressPrivateLinkEndpoint{ Kind: "AzureIngressPrivateLinkEndpoint", - PrivateEndpointResourceId: privateEndpointResourceId, + PrivateEndpointResourceId: endpointResourceId, }, } case pcloud.Gcp: - if privateServiceConnectConnectionId == "" { - return fmt.Errorf("flag \"private-service-connect-connection-id\" is required for --cloud gcp") + if pscConnectionId == "" { + return fmt.Errorf("flag \"psc-connection-id\" is required for --cloud gcp") } createIngressEndpoint.Spec.Config = &networkingaccesspointv1.NetworkingV1AccessPointSpecConfigOneOf{ NetworkingV1GcpIngressPrivateServiceConnectEndpoint: &networkingaccesspointv1.NetworkingV1GcpIngressPrivateServiceConnectEndpoint{ Kind: "GcpIngressPrivateServiceConnectEndpoint", - PrivateServiceConnectConnectionId: privateServiceConnectConnectionId, + PrivateServiceConnectConnectionId: pscConnectionId, }, } default: diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden index 587ecae872..2393a586a6 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-help.golden @@ -10,21 +10,21 @@ Create an AWS PrivateLink ingress endpoint. Create an Azure Private Link ingress endpoint. - $ confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName + $ confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName Create a GCP Private Service Connect ingress endpoint. - $ confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --private-service-connect-connection-id 111111111111111111 + $ confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --psc-connection-id 111111111111111111 Flags: - --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". - --vpc-endpoint-id string ID of an AWS VPC endpoint; only valid with --cloud aws. - --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint; only valid with --cloud azure. - --private-service-connect-connection-id string ID of a GCP Private Service Connect connection; only valid with --cloud gcp. - --gateway string REQUIRED: Gateway ID. - --context string CLI context name. - --environment string Environment ID. - -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --gateway string REQUIRED: Gateway ID. + --vpc-endpoint-id string ID of an AWS VPC endpoint; only valid with --cloud aws. + --endpoint-resource-id string Resource ID of an Azure Private Endpoint; only valid with --cloud azure. + --psc-connection-id string ID of a GCP Private Service Connect connection; only valid with --cloud gcp. + --context string CLI context name. + --environment string Environment ID. + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") Global Flags: -h, --help Show help for this command. diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden index 0b93f267ae..dec1e76605 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden @@ -1,4 +1,4 @@ -Error: if any flags in the group [vpc-endpoint-id private-endpoint-resource-id private-service-connect-connection-id] are set none of the others can be; [private-endpoint-resource-id vpc-endpoint-id] were all set +Error: if any flags in the group [vpc-endpoint-id endpoint-resource-id psc-connection-id] are set none of the others can be; [endpoint-resource-id vpc-endpoint-id] were all set Usage: confluent network access-point private-link ingress-endpoint create [name] [flags] @@ -9,21 +9,21 @@ Create an AWS PrivateLink ingress endpoint. Create an Azure Private Link ingress endpoint. - $ confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName + $ confluent network access-point private-link ingress-endpoint create --cloud azure --gateway gw-123456 --endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName Create a GCP Private Service Connect ingress endpoint. - $ confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --private-service-connect-connection-id 111111111111111111 + $ confluent network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-123456 --psc-connection-id 111111111111111111 Flags: - --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". - --vpc-endpoint-id string ID of an AWS VPC endpoint; only valid with --cloud aws. - --private-endpoint-resource-id string Resource ID of an Azure Private Endpoint; only valid with --cloud azure. - --private-service-connect-connection-id string ID of a GCP Private Service Connect connection; only valid with --cloud gcp. - --gateway string REQUIRED: Gateway ID. - --context string CLI context name. - --environment string Environment ID. - -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") + --cloud string REQUIRED: Specify the cloud provider as "aws", "azure", or "gcp". + --gateway string REQUIRED: Gateway ID. + --vpc-endpoint-id string ID of an AWS VPC endpoint; only valid with --cloud aws. + --endpoint-resource-id string Resource ID of an Azure Private Endpoint; only valid with --cloud azure. + --psc-connection-id string ID of a GCP Private Service Connect connection; only valid with --cloud gcp. + --context string CLI context name. + --environment string Environment ID. + -o, --output string Specify the output format as "human", "json", or "yaml". (default "human") Global Flags: -h, --help Show help for this command. diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden index 00af71ef5e..7084ee635b 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden @@ -1 +1 @@ -Error: flag "private-endpoint-resource-id" is required for --cloud azure +Error: flag "endpoint-resource-id" is required for --cloud azure diff --git a/test/network_test.go b/test/network_test.go index 427900b3f6..0eae1b7829 100644 --- a/test/network_test.go +++ b/test/network_test.go @@ -1178,15 +1178,15 @@ func (s *CLITestSuite) TestNetworkAccessPointPrivateLinkIngressEndpoint() { tests := []CLITest{ {args: "network access-point private-link ingress-endpoint create --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0", fixture: "network/access-point/private-link/ingress-endpoint/create-aws.golden"}, {args: "network access-point private-link ingress-endpoint create my-ingress-endpoint --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0", fixture: "network/access-point/private-link/ingress-endpoint/create-aws-name.golden"}, - {args: "network access-point private-link ingress-endpoint create --cloud azure --gateway gw-11111 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", fixture: "network/access-point/private-link/ingress-endpoint/create-azure.golden"}, - {args: "network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-99999 --private-service-connect-connection-id 111111111111111111", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp.golden"}, + {args: "network access-point private-link ingress-endpoint create --cloud azure --gateway gw-11111 --endpoint-resource-id /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName", fixture: "network/access-point/private-link/ingress-endpoint/create-azure.golden"}, + {args: "network access-point private-link ingress-endpoint create --cloud gcp --gateway gw-99999 --psc-connection-id 111111111111111111", fixture: "network/access-point/private-link/ingress-endpoint/create-gcp.golden"}, {args: "network access-point private-link ingress-endpoint update ap-88888 --name my-new-aws-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-aws.golden"}, {args: "network access-point private-link ingress-endpoint update ap-11111 --name my-new-azure-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-azure.golden"}, {args: "network access-point private-link ingress-endpoint update ap-22222 --name my-new-gcp-ingress-access-point", fixture: "network/access-point/private-link/ingress-endpoint/update-gcp.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-88888", input: "y\n", fixture: "network/access-point/private-link/ingress-endpoint/delete.golden"}, {args: "network access-point private-link ingress-endpoint delete ap-99999 ap-88888", input: "y\n", fixture: "network/access-point/private-link/ingress-endpoint/delete-multiple.golden"}, {args: "network access-point private-link ingress-endpoint create --cloud azure --gateway gw-11111 --vpc-endpoint-id vpce-1234567890abcdef0", fixture: "network/access-point/private-link/ingress-endpoint/create-wrong-cloud-flag.golden", exitCode: 1}, - {args: "network access-point private-link ingress-endpoint create --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0 --private-endpoint-resource-id /subscriptions/0000000/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe", fixture: "network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden", exitCode: 1}, + {args: "network access-point private-link ingress-endpoint create --cloud aws --gateway gw-88888 --vpc-endpoint-id vpce-1234567890abcdef0 --endpoint-resource-id /subscriptions/0000000/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/pe", fixture: "network/access-point/private-link/ingress-endpoint/create-two-cloud-flags.golden", exitCode: 1}, {args: "network access-point private-link ingress-endpoint delete ap-invalid", fixture: "network/access-point/private-link/ingress-endpoint/delete-fail.golden", exitCode: 1}, } From 4a0e1a4d8697b45a44a0e653629c7ea56ca3704d Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Wed, 6 May 2026 13:45:25 -0500 Subject: [PATCH 17/18] Add "psc" to lint vocabulary words Co-Authored-By: Claude Sonnet 4.6 (1M context) --- cmd/lint/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/lint/main.go b/cmd/lint/main.go index 1115440a25..32f50a9370 100644 --- a/cmd/lint/main.go +++ b/cmd/lint/main.go @@ -310,6 +310,7 @@ var vocabWords = []string{ "producer.config", "prometheus", "protobuf", + "psc", "rbac", "readonly", "readwrite", From 4f46e2944b5ff7d7db5dd02062b54ce1e6e791a1 Mon Sep 17 00:00:00 2001 From: Richard Yang Date: Wed, 6 May 2026 14:16:07 -0500 Subject: [PATCH 18/18] Regenerate golden files for ErrorMessage field and renamed VpcEndpointServiceName - ingressEndpointOut list golden now includes Error Message column - Gateway describe golden updated for AWS VPC Endpoint Service Name rename - DNS record and gateway autocomplete goldens updated with new Azure/GCP ingress resources Co-Authored-By: Claude Sonnet 4.6 (1M context) --- .../private-link/ingress-endpoint/list.golden | 12 ++++++------ .../create-autocomplete-gateway-flag.golden | 2 ++ ...plete-private-link-access-point-flag.golden | 2 ++ .../gateway/describe-aws-ingress-json.golden | 2 +- .../gateway/describe-aws-ingress.golden | 18 +++++++++--------- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden index 00e1110364..4d103ea79a 100644 --- a/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden +++ b/test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden @@ -1,6 +1,6 @@ - ID | Name | Environment | Gateway | Phase | AWS VPC Endpoint ID | AWS VPC Endpoint Service Name | Azure Private Link Service | Azure Private Link Service | Azure Private Endpoint | GCP PSC Service Attachment | GCP PSC Connection ID | DNS Domain - | | | | | | | Alias | Resource ID | Resource ID | | | ------------+-------------------------------+-------------+----------+-------+------------------------+---------------------------------------------------------+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------------------+------------------------------------------------------ - ap-11111 | my-azure-ingress-access-point | env-596 | gw-11111 | READY | | | azure-pls-alias.eastus.azure.privatelinkservice | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName | /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName | | | ap11111.eastus.azure.accesspoint.confluent.cloud - ap-22222 | my-gcp-ingress-access-point | env-596 | gw-99999 | READY | | | | | | projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName | 111111111111111111 | ap22222.us-central1.gcp.accesspoint.confluent.cloud - ap-99999 | my-aws-ingress-access-point | env-596 | gw-88888 | READY | vpce-1234567890abcdef0 | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | ap123abc.us-west-2.aws.accesspoint.confluent.cloud + ID | Name | Environment | Gateway | Phase | AWS VPC Endpoint ID | AWS VPC Endpoint Service Name | Azure Private Link Service | Azure Private Link Service | Azure Private Endpoint | GCP PSC Service Attachment | GCP PSC Connection ID | DNS Domain | Error Message + | | | | | | | Alias | Resource ID | Resource ID | | | | +-----------+-------------------------------+-------------+----------+-------+------------------------+---------------------------------------------------------+-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------------------+-----------------------------------------------------+---------------- + ap-11111 | my-azure-ingress-access-point | env-596 | gw-11111 | READY | | | azure-pls-alias.eastus.azure.privatelinkservice | /subscriptions/0000000/resourceGroups/plsRgName/providers/Microsoft.Network/privateLinkServices/privateLinkServiceName | /subscriptions/0000000/resourceGroups/resourceGroupName/providers/Microsoft.Network/privateEndpoints/privateEndpointName | | | ap11111.eastus.azure.accesspoint.confluent.cloud | + ap-22222 | my-gcp-ingress-access-point | env-596 | gw-99999 | READY | | | | | | projects/projectName/regions/us-central1/serviceAttachments/serviceAttachmentName | 111111111111111111 | ap22222.us-central1.gcp.accesspoint.confluent.cloud | + ap-99999 | my-aws-ingress-access-point | env-596 | gw-88888 | READY | vpce-1234567890abcdef0 | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | | | | | | ap123abc.us-west-2.aws.accesspoint.confluent.cloud | diff --git a/test/fixtures/output/network/dns/record/create-autocomplete-gateway-flag.golden b/test/fixtures/output/network/dns/record/create-autocomplete-gateway-flag.golden index 3bae66e233..11b078da02 100644 --- a/test/fixtures/output/network/dns/record/create-autocomplete-gateway-flag.golden +++ b/test/fixtures/output/network/dns/record/create-autocomplete-gateway-flag.golden @@ -6,5 +6,7 @@ gw-09876 my-azure-peering-gateway gw-13570 my-gcp-peering-gateway gw-07531 my-gcp-gateway gw-88888 my-aws-ingress-gateway +gw-99999 my-gcp-ingress-gateway +gw-11111 my-azure-ingress-gateway :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/dns/record/create-autocomplete-private-link-access-point-flag.golden b/test/fixtures/output/network/dns/record/create-autocomplete-private-link-access-point-flag.golden index 655d02edbd..375b72d3d7 100644 --- a/test/fixtures/output/network/dns/record/create-autocomplete-private-link-access-point-flag.golden +++ b/test/fixtures/output/network/dns/record/create-autocomplete-private-link-access-point-flag.golden @@ -3,5 +3,7 @@ ap-67890 my-azure-egress-access-point ap-54321 my-aws-private-network-interface-access-point ap-88888 my-gcp-egress-access-point ap-99999 my-aws-ingress-access-point +ap-11111 my-azure-ingress-access-point +ap-22222 my-gcp-ingress-access-point :4 Completion ended with directive: ShellCompDirectiveNoFileComp diff --git a/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden b/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden index 8d7759c35a..634b635a2d 100644 --- a/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden +++ b/test/fixtures/output/network/gateway/describe-aws-ingress-json.golden @@ -4,6 +4,6 @@ "environment": "env-596", "region": "us-west-2", "type": "AwsIngressPrivateLink", - "vpc_endpoint_service_name": "com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000", + "aws_vpc_endpoint_service_name": "com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000", "phase": "READY" } diff --git a/test/fixtures/output/network/gateway/describe-aws-ingress.golden b/test/fixtures/output/network/gateway/describe-aws-ingress.golden index f495e5598d..6336424a5d 100644 --- a/test/fixtures/output/network/gateway/describe-aws-ingress.golden +++ b/test/fixtures/output/network/gateway/describe-aws-ingress.golden @@ -1,9 +1,9 @@ -+---------------------------+---------------------------------------------------------+ -| ID | gw-88888 | -| Name | my-aws-ingress-gateway | -| Environment | env-596 | -| Region | us-west-2 | -| Type | AwsIngressPrivateLink | -| VPC Endpoint Service Name | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | -| Phase | READY | -+---------------------------+---------------------------------------------------------+ ++-------------------------------+---------------------------------------------------------+ +| ID | gw-88888 | +| Name | my-aws-ingress-gateway | +| Environment | env-596 | +| Region | us-west-2 | +| Type | AwsIngressPrivateLink | +| AWS VPC Endpoint Service Name | com.amazonaws.vpce.us-west-2.vpce-svc-00000000000000000 | +| Phase | READY | ++-------------------------------+---------------------------------------------------------+