Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

project_id missing from Connection API resource #317

Open
t0mk opened this issue Jan 5, 2022 · 2 comments
Open

project_id missing from Connection API resource #317

t0mk opened this issue Jan 5, 2022 · 2 comments

Comments

@t0mk
Copy link
Contributor

t0mk commented Jan 5, 2022

While wokring on Fabric Service Token support in the provider, I realized it's not possible to find out project ID from existing Dedicated Connection API resource. Connection resource is created by POST to /projects/UUID/connection. Terraform resource metal_connection then needs to know the project ID in order to create the connection. TF provider also needs to be able to get all the parameters (it just needs it) from API.

I can get the project ID for Shared Connection from virtual circuits on Connection Ports, but for Dedicated connections, there's no virtual circuits on the ports. It would be better if project href is present in the Connection resource.

This is a blocker for Fabric Service Token (and also Connection) support in the Terraform provider:
equinix/terraform-provider-metal#207

@t0mk
Copy link
Contributor Author

t0mk commented Jan 5, 2022

This is an API bug @displague please add the label.

@displague
Copy link
Contributor

I believe POST /organizations/{id}/connection does not require a project_id for Dedicated connections.

If packngo offered a second function or logic to change endpoints based on project_id being specified then Terraform would not need a project_id in these cases.

When importing a connection, if the port is dedicated, a project_id should not be required. We can make this optional in TF.

How does this sound, @t0mk?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants