Conversation
There was a problem hiding this comment.
Pull request overview
Adds Terraform support for configuring AWS PNI (Private Network Interface) egress CIDR routes on confluent_access_point resources/data sources, including schema, CRUD wiring, docs, and test fixtures.
Changes:
- Add
routesattribute toaws_private_network_interfacefor theconfluent_access_pointresource and data source. - Map
routes↔ APIegress_routeson create/read, and support in-place update logic. - Update docs, wiremock test fixtures, and Go module replacement for the internal networking-access-point SDK.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/provider/resource_access_point.go | Adds routes to schema; wires routes into create/read/update logic for AWS PNI access points. |
| internal/provider/data_source_access_point.go | Exposes computed routes attribute for the access point data source AWS PNI block. |
| internal/provider/resource_access_point_test.go | Extends acceptance test assertions and test config to include routes. |
| internal/provider/data_source_access_point_test.go | Extends data source acceptance test assertions to include routes. |
| internal/testdata/network_access_point/create_aws_private_network_interface_ap.json | Adds egress_routes to mocked create response payload. |
| internal/testdata/network_access_point/read_created_aws_private_network_interface_ap.json | Adds egress_routes to mocked read response payload. |
| internal/testdata/network_access_point/update_aws_private_network_interface_ap.json | Adds egress_routes to mocked update response payload. |
| docs/resources/confluent_access_point.md | Documents the new routes argument/attribute and provides example usage. |
| docs/data-sources/confluent_access_point.md | Documents the exported routes attribute on the data source. |
| go.mod | Updates Go version and adds a replace to use internal networking-access-point SDK. |
| go.sum | Adds checksums for the internal networking-access-point SDK module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| (d.HasChange(fmt.Sprintf("%s.0.%s", paramAwsPrivateNetworkInterface, paramNetworkInterfaces)) || | ||
| d.HasChange(fmt.Sprintf("%s.0.%s", paramAwsPrivateNetworkInterface, paramRoutes))) { | ||
| updatedConfig := netap.NetworkingV1AwsPrivateNetworkInterface{ | ||
| Kind: paramAwsPrivateNetworkInterface, |
There was a problem hiding this comment.
In accessPointUpdate, the config discriminator Kind is set to paramAwsPrivateNetworkInterface ("aws_private_network_interface"), while accessPointCreate uses awsPrivateNetworkInterface ("AwsPrivateNetworkInterface"). Using the schema/block name here is inconsistent and may cause the API discriminator to be incorrect during PATCH updates. Align Kind to the same value used on create (the SDK/API kind string).
| Kind: paramAwsPrivateNetworkInterface, | |
| Kind: awsPrivateNetworkInterface, |
| @@ -344,6 +347,9 @@ func TestAccAccessPointAwsPrivateNetworkInterface(t *testing.T) { | |||
| resource.TestCheckResourceAttr(accessPointResourceLabel, "aws_private_network_interface.0.network_interfaces.0", "eni-00000000000000000"), | |||
| resource.TestCheckResourceAttr(accessPointResourceLabel, "aws_private_network_interface.0.network_interfaces.1", "eni-00000000000000001"), | |||
| resource.TestCheckResourceAttr(accessPointResourceLabel, "aws_private_network_interface.0.account", "000000000000"), | |||
| resource.TestCheckResourceAttr(accessPointResourceLabel, "aws_private_network_interface.0.routes.#", "2"), | |||
| resource.TestCheckResourceAttr(accessPointResourceLabel, "aws_private_network_interface.0.routes.0", "172.31.0.0/16"), | |||
| resource.TestCheckResourceAttr(accessPointResourceLabel, "aws_private_network_interface.0.routes.1", "10.108.16.0/21"), | |||
There was a problem hiding this comment.
The acceptance test covers reading routes from state, but it never performs an update that changes aws_private_network_interface.routes to exercise the new in-place update behavior. Add a test step that modifies routes (e.g., add/remove a CIDR) and assert the updated state to ensure the update code path is validated.
Release Notes
New Features
routesattribute toaws_private_network_interfaceblock inconfluent_access_pointresource and data source, enabling configuration of egress CIDR routes for bidirectional PNI traffic.Bug Fixes
Examples
Checklist
Test & Reviewsection below.Blast Radiussection below.What
Adds support for egress routes on AWS Private Network Interface (PNI) Access Points.
Changes:
Note: Uses internal SDK (ccloud-sdk-go-v2-internal/networking-access-point@v0.11.0) via replace directive until egress_routes is promoted to public SDK.
Blast Radius
Low: Only affects customers using confluent_access_point with aws_private_network_interface configuration
References
https://confluentinc.atlassian.net/browse/APIE-778
Test & Review
https://confluent.slack.com/archives/C08H9NWM0TG/p1770821914183479