Add Azure and GCP ingress access point and gateway support#3283
Add Azure and GCP ingress access point and gateway support#3283Elango Jagadeesan (ejagade) wants to merge 8 commits intomainfrom
Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
Pull request overview
Adds Azure and GCP ingress support to the CLI’s networking gateways and access-point private-link ingress endpoints, updating the ccloud v2 clients to use the newer “internal” SDKs and expanding the test backend/fixtures accordingly.
Changes:
- Add Azure ingress Private Link + GCP ingress Private Service Connect gateway + access-point ingress endpoint support.
- Update ccloudv2 gateway/access-point list filtering to use
MultipleSearchFiltertypes from the new SDKs. - Expand integration test backend handlers and golden fixtures for the new gateway/access point types.
Reviewed changes
Copilot reviewed 75 out of 77 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/test-server/networking_handlers.go | Extends mock API responses to include Azure/GCP ingress gateway + access-point resources. |
| test/network_test.go | Adds integration tests covering new Azure/GCP ingress create/update/describe/delete flows. |
| test/fixtures/output/network/gateway/update.golden | Updates expected gateway update output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/list.golden | Updates expected gateway list output with new columns/rows for Azure/GCP ingress. |
| test/fixtures/output/network/gateway/list-json.golden | Updates JSON list output with Azure/GCP ingress gateway fields. |
| test/fixtures/output/network/gateway/list-filter-type.golden | Updates filtered list expectation (now “None found.”). |
| test/fixtures/output/network/gateway/list-filter-region.golden | Updates filtered list expectation (now “None found.”). |
| test/fixtures/output/network/gateway/list-filter-phase.golden | Updates filtered list expectation (now “None found.”). |
| test/fixtures/output/network/gateway/list-filter-name.golden | Updates filtered list expectation (now “None found.”). |
| test/fixtures/output/network/gateway/list-filter-multiple.golden | Updates filtered list expectation (now “None found.”). |
| test/fixtures/output/network/gateway/list-filter-id.golden | Updates filtered list expectation (now “None found.”). |
| test/fixtures/output/network/gateway/describe-gcp.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-gcp-ingress.golden | Adds expected output for describing a GCP ingress PSC gateway. |
| test/fixtures/output/network/gateway/describe-gcp-dns-peering.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-azure.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-azure-ingress.golden | Adds expected output for describing an Azure ingress Private Link gateway. |
| test/fixtures/output/network/gateway/describe-aws.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-aws-private-network-interface.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-aws-json.golden | Updates expected describe JSON output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-aws-ingress.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-aws-ingress-json.golden | Updates expected describe JSON output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/describe-autocomplete.golden | Updates autocomplete output to include new gateway IDs. |
| test/fixtures/output/network/gateway/delete.golden | Updates expected delete output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/delete-multiple.golden | Updates expected delete-multiple output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/delete-fail.golden | Updates expected delete-fail output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/delete-azure-ingress.golden | Adds expected delete output for Azure ingress gateway. |
| test/fixtures/output/network/gateway/delete-azure-ingress-multiple.golden | Adds expected delete output for multiple gateways including Azure ingress. |
| test/fixtures/output/network/gateway/create-type-autocomplete.golden | Updates create-type autocomplete to include ingress PSC type. |
| test/fixtures/output/network/gateway/create-gcp-ingress.golden | Adds expected create output for GCP ingress PSC gateway. |
| test/fixtures/output/network/gateway/create-azure-ingress.golden | Adds expected create output for Azure ingress Private Link gateway. |
| test/fixtures/output/network/gateway/create-aws.golden | Updates expected create output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/create-aws-private-network-interface.golden | Updates expected create output (now includes coverage warning line). |
| test/fixtures/output/network/gateway/create-aws-ingress.golden | Updates expected create output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-gcp.golden | Adds expected update output for GCP ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-azure.golden | Adds expected update output for Azure ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-aws.golden | Updates expected update output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/update-autocomplete.golden | Updates update autocomplete output to include Azure/GCP ingress endpoints. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/list.golden | Updates ingress endpoint list output to include Azure/GCP columns/rows. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/list-json.golden | Updates JSON list output to include Azure/GCP ingress endpoint fields. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp.golden | Adds expected describe output for GCP ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-gcp-json.golden | Adds expected describe JSON output for GCP ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure.golden | Adds expected describe output for Azure ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-azure-json.golden | Adds expected describe JSON output for Azure ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws.golden | Updates expected describe output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-aws-json.golden | Updates expected describe JSON output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/describe-autocomplete.golden | Updates describe autocomplete output to include Azure/GCP ingress endpoints. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete.golden | Updates expected delete output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-multiple.golden | Updates expected delete-multiple output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-fail.golden | Updates expected delete-fail output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/delete-autocomplete.golden | Updates delete autocomplete output to include Azure/GCP ingress endpoints. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-gcp.golden | Adds expected create output for GCP ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-azure.golden | Adds expected create output for Azure ingress endpoint. |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws.golden | Updates expected create output (now includes coverage warning line). |
| test/fixtures/output/network/access-point/private-link/ingress-endpoint/create-aws-name.golden | Updates expected create output (now includes coverage warning line). |
| pkg/ccloudv2/networking_access_point.go | Switches list filters to new MultipleSearchFilter request types. |
| pkg/ccloudv2/networking-gateway.go | Switches gateway list filters to new MultipleSearchFilter request types. |
| pkg/ccloudv2/client.go | Updates imports to the new internal networking access-point/gateway SDKs. |
| internal/network/command_gateway_update.go | Updates gateway update command to new internal gateway SDK import. |
| internal/network/command_gateway_list.go | Extends gateway list output for Azure/GCP ingress fields and type handling. |
| internal/network/command_gateway_create.go | Adds Azure/GCP ingress gateway create support and updates cloud flag handling. |
| internal/network/command_gateway.go | Adds new gateway type constants and output fields for Azure/GCP ingress. |
| internal/network/command_dns_record_update.go | Updates imports to new internal access-point SDK. |
| internal/network/command_dns_record_create.go | Updates imports to new internal access-point SDK. |
| internal/network/command_dns_record.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_network_interface_update.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_network_interface_create.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_network_interface.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_link_ingress_endpoint_update.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_link_ingress_endpoint_list.go | Extends ingress endpoint list output to include Azure/GCP types/fields. |
| internal/network/command_access_point_private_link_ingress_endpoint_create.go | Adds Azure/GCP ingress endpoint create flags and config mapping. |
| internal/network/command_access_point_private_link_ingress_endpoint.go | Extends ingress endpoint output schema + autocomplete filtering for Azure/GCP. |
| internal/network/command_access_point_private_link_egress_endpoint_update.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_link_egress_endpoint_create.go | Updates imports to new internal access-point SDK. |
| internal/network/command_access_point_private_link_egress_endpoint.go | Updates imports to new internal access-point SDK. |
| go.sum | Adds sums for new internal networking SDK modules. |
| go.mod | Switches networking gateway/access-point dependencies to internal SDK modules. |
| .gitignore | Ignores newly added mock-test/ directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| }, | ||
| } | ||
| } | ||
| } |
| if names != nil { | ||
| req = req.SpecDisplayName(names) | ||
| req = req.SpecDisplayName(networkingaccesspointv1.MultipleSearchFilter{Items: names}) | ||
| } |
| 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}) | ||
| } |
| 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) |
| warning: GOCOVERDIR not set, no coverage data emitted | ||
| None found. |
| 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 | | | | | | | | |
Steven Gagniere (sgagniere)
left a comment
There was a problem hiding this comment.
Thanks for the PR! Here's a few comments:
| 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() { |
There was a problem hiding this comment.
Nitpick: This guard is probably unnecessary since GetDnsDomain will return empty string if it's not set.
| @@ -1 +1,2 @@ | |||
| warning: GOCOVERDIR not set, no coverage data emitted | |||
There was a problem hiding this comment.
We'll want to remove these lines.
Running make integration-test should automatically export this var and remove this warning.
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 <noreply@anthropic.com>
… 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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
41fa433 to
ddd2d41
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adds support for Azure and GCP ingress access points and gateways to the CLI.
Changes
Testing
Updated test fixtures to include Azure and GCP ingress endpoint and gateway scenarios.