chore: Add PENDING_INTERFACE_CONFIGURATION to sweepable connection state - #1050
tng1-equinix wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1050 +/- ##
==========================================
+ Coverage 70.33% 70.64% +0.31%
==========================================
Files 177 177
Lines 21826 21826
==========================================
+ Hits 15351 15419 +68
+ Misses 5673 5593 -80
- Partials 802 814 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Fabric connection test sweeper so it can also find and delete test connections that are stuck in the PENDING_INTERFACE_CONFIGURATION state, helping prevent leaked resources during acceptance test cleanup.
Changes:
- Expanded the connection search filter to include
PENDING_INTERFACE_CONFIGURATIONin addition toPROVISIONED.
| Property: &equinixStatus, | ||
| Operator: &equalOperator, | ||
| Values: []string{string(fabricv4.EQUINIXSTATUS_PROVISIONED)}, | ||
| Values: []string{string(fabricv4.EQUINIXSTATUS_PROVISIONED), string(fabricv4.EQUINIXSTATUS_PENDING_INTERFACE_CONFIGURATION)}, |
There was a problem hiding this comment.
The documentation shows that the equalOperator can accept a list of values (ACTIVE and REPROVISIONING are given in the example): https://docs.equinix.com/fabric/fabric-api/getting-port-info#search-for-ports
There was a problem hiding this comment.
@tng1-equinix Are these the only two connection statuses you want to sweep? The filter is already prefix checked. Is the status check even necessary? Are any status values going to indicate that we should not sweep the test prefixed connection?
| func AddTestSweeper() { | ||
| resource.AddTestSweepers("equinix_fabric_connection", &resource.Sweeper{ | ||
| Name: "equinix_fabric_connection", | ||
| Dependencies: []string{}, |
There was a problem hiding this comment.
What are the dependencies of a connection?
What things should be deleting/deconstructed/deconfigured before it is safe to delete a connection? What must be deleted first to unblock deletion?
equinix/internal/sweep","Output":"2026/07/14 06:45:03 \t- equinix_fabric_network: error deleting network: 400 Bad Request Code: EQ-3152019, Message: Network cannot be deleted with active connections, Details: Active connection count: 1\n"***
***"Time":"2026-07-14T06:45:03.848493627Z","Action":"output","Package":"github.com/equinix/terraform-provider-equinix/internal/sweep","Output":"error deleting network: 400 Bad Request Code: EQ-3152019, Message: Network cannot be deleted with active connections, Details: Active connection count: 1\n"***
***"Time":"2026-07-14T06:45:03.848499297Z","Action":"output","Package":"github.com/equinix/terraform-provider-equinix/internal/sweep","Output":"error deleting network: 400 Bad Request Code: EQ-3152019, Message: Network cannot be deleted with active connections, Details: Active connection count: 1\n"***
No description provided.