-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve support for virtual circuits on shared connections #363
Comments
#263 and the issues linked there, were created in a similar effort, wrt |
It turns out that, for shared connections, you must specify the VRFs when the connection is created and changing the VRFs requires deleting and recreating the connection. Since that is more solidly hidden inside the shared connection resource within the API, it would be harder to support VRFs on shared connections using the new resource described in this issue than to hide the VRF logic inside the connection resource. It's possible we'd benefit from splitting dedicated vs. shared connections into separate resources (deprecate |
VLANs are currently optional for
VRFs could be added and made optional (only for shared, since dedicated would take a virtual-circuit approact) and force new. perhaps it would be clearer if |
#629 relates to this; without improved support for virtual circuits on shared connections, it is not straightforward to update the BGP settings on a virtual circuit belonging to a shared VRF connection. Updating those settings at the moment would require creating the shared VRF connection, importing the API-managed circuits into terraform state, and then updating terraform config to define values for required properties that match the API-managed values in order to be able to terraform plan/apply the BGP setting changes. Since the last activity on this issue ~6 months ago, the API has also been updated to limit what can be done with virtual circuits on shared interconnections:
It's possible the only update you could make to a virtual circuit on a shared interconnection is to change the BGP settings, in which case it might make more sense to have the interconnection resource handle the BGP settings rather than making changes to the virtual circuit resource or adding a separate resource just for this case. If it were possible, in the API, to specify these BGP settings when a shared VRF connection is created, would users still need to update them later? |
Community Note
Description
An issue we run up against for managing certain attributes of a shared
metal_connection
is that the API creates hidden virtual circuits (or hidden ports & virtual circuits?) for shared connections. In the past, we've worked around this limitation by having themetal_connection
directly manage some virtual circuit settings (in particular,vlans
) for those hidden virtual circuits.As we add more features to those hidden virtual circuits, it becomes more complicated to hide logic inside the
metal_connection
resource. For example, we'd like to add support for VRF on shared connections (#360); if we follow the existing model, we would add avrfs
attribute that only works for shared connections, and would hide the logic for attaching those to the connection's hidden virtual circuits inside themetal_connection
resource.Instead of managing shared
metal_connection
virtual circuits via themetal_connection
resource, we could enable customers to manage those circuits with a separatemetal_shared_virtual_circuit
resource, so that network configuration is more consistent between shared & dedicated connections, and so that we are not hiding some virtual circuit management inside ourmetal_connection
resource.The below HCL example demonstrates a
metal_shared_virtual_circuit
resource that expects theid
attribute to be provided. On create, it makes aVCUpdateRequest
instead ofVCCreateRequest
, passing thevlan
orvrf
specified in the configuration. On delete, it makes aVCUpdateRequest
instead ofVCDeleteRequest
, which detaches thevrf
orvlan
from the virtual circuit.While this is more verbose than hiding the shared virtual circuit logic in the
metal_connection
resource, it is also more explicit/intentional, and it more closely matches the reality of how these hidden virtual circuits are managed. In the web UI, for example, you can only change shared connection VLANs one at a time, and swapping VLANs requires at least 3 button clicks.Another alternative would be to add a new
metal_shared_virtual_circuit
to implement the logic for virtual circuits that are attached to shared connections and can't be created or deleted.New or Affected Resource(s)
metal_shared_virtual_circuit
(maybe?)Potential Terraform Configuration
References
metal_connection
#272The text was updated successfully, but these errors were encountered: