feat(networking): ports, floating IPs, and networking lookup data sources - #10
Merged
Conversation
… sources Resources: - pcd_networking_port — Neutron port with requested fixed IPs, security groups, allowed-address pairs, device binding, and tags. fixed_ip and allowed_address_pairs hold the user's requested config and are not refreshed from the server (Neutron fills in addresses/MACs that would otherwise churn the plan); the computed all_fixed_ips reports the addresses actually assigned. - pcd_networking_floatingip — allocate a floating IP from an external network by its pool name (resolved to floating_network_id), optionally associate it with a port, and disassociate on update. Data sources: - pcd_networking_port, _router, _floatingip — single-result lookups by id/filters. - pcd_networking_subnet_ids, _port_ids — list matching IDs, sorted, with a stable synthetic id. Acceptance tests cover port CRUD + import and the four always-available data sources; the floating IP test skips unless PCD_ACC_EXTERNAL_NETWORK names an external network. build/vet/gofmt/golangci-lint and tfplugindocs all clean.
PF9-pushkar
added a commit
that referenced
this pull request
Jul 14, 2026
feat(networking): ports, floating IPs, and networking lookup data sources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the first batch of Phase 1 networking follow-ups (part of #2).
Resources
pcd_networking_port— Neutron port:network_id,name,admin_state_up,mac_address,device_id/device_owner, requestedfixed_ipblocks,security_group_ids,allowed_address_pairs, andtags. Computedstatus+all_fixed_ips.pcd_networking_floatingip— allocate from an external network bypoolname (resolved tofloating_network_id), optionalport_id/fixed_ipassociation, tags. Associate/disassociate handled on update.Data sources
pcd_networking_port,pcd_networking_router,pcd_networking_floatingip— single-result lookups by ID or filters.pcd_networking_subnet_ids,pcd_networking_port_ids— return matching IDs, sorted ascending, with a stable syntheticid.Design note
fixed_ipandallowed_address_pairsare treated as user-desired configuration and are not refreshed from Neutron on read: the server fills in assigned addresses and the port MAC on each pair, which would otherwise produce a perpetual plan diff under the plugin framework. The computedall_fixed_ipsreports the addresses Neutron actually assigned.Tests & checks
TestAccNetworkingPort_basic— create/update/import.TestAccNetworkingExtraDataSources_basic— port / router / subnet_ids / port_ids.TestAccNetworkingFloatingIP_basic— skips unlessPCD_ACC_EXTERNAL_NETWORKnames an external network.go build/vet/gofmt/golangci-lint(0 issues) andtfplugindocs generateall clean.Live-validation status
Code-complete and static-checks-green. Not yet run against the CE lab — the lab credentials weren't available in this working session (no lab-side blocker expected for ports/data sources). Floating IPs additionally require an external network in the lab. Tracked in
DECISIONS.md.