equinix / terraform-provider-equinix

Terraform Equinix provider
https://deploy.equinix.com/labs/terraform-provider-equinix/
MIT License
47 stars 45 forks source link

feat: Support IPv6 parameters when creating / updating interconnection virtual circuits #717

Open RaptorGandalf opened 3 days ago

RaptorGandalf commented 3 days ago

This PR adds support for the newly available IPv6 parameters when creating / updating interconnection virtual circuits. To allow this feature to also be used with shared interconnections, some changes to the create logic of the interconnection virtual circuit resource were made.

With shared interconnections, the customer does not create virtual circuits, but rather they are created for them by the metal API. Attempting to create a virtual circuit on a shared connection will result in an error from the Metal API.

To get around this, an optional virtual_circuit_id parameter has been added to the virtual circuit resource. If this value is present, the terraform create function will issue an update call to the metal API for the existing specified virtual circuit, rather than trying to create a new one.

Additionally I have added support for the already existing IPv4 parameters in the update function which seemed to be missing.

codecov-commenter commented 3 days ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 64.73988% with 61 lines in your changes missing coverage. Please review.

Project coverage is 53.71%. Comparing base (503d9e1) to head (07756d8). Report is 86 commits behind head on main.

Files Patch % Lines
...ternal/resources/metal/virtual_circuit/resource.go 60.89% 50 Missing and 11 partials :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #717 +/- ## =========================================== + Coverage 37.91% 53.71% +15.79% =========================================== Files 120 151 +31 Lines 19476 20723 +1247 =========================================== + Hits 7384 11131 +3747 + Misses 11884 9138 -2746 - Partials 208 454 +246 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.