Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Datasource metal_facility #31

Merged
merged 2 commits into from
Mar 4, 2021
Merged

Datasource metal_facility #31

merged 2 commits into from
Mar 4, 2021

Conversation

displague
Copy link
Member

@displague displague commented Feb 10, 2021

I needed a simple resource to test #30 so I added this non-sensitive data resource that can be tested quickly without creating remote resources.

We may wish to add the ability to lookup facility by ID in the future, I found that all of the existing Terraform resources only expose facility code, so this seemed like the best attribute to start with.

An auth token environment variable is still needed to run the test, there are no unauthenticated endpoints in the EM API.

TF_LOG=DEBUG TF_ACC=1 go test ./... -v -timeout=20m -run=TestAccFacilityDataSource_Basic

Signed-off-by: Marques Johansson <[email protected]>
Removing the address attribute because it is not handled properly.

The EM API returns:
{ "address": { "href": "#29e55e9e-e2d6-4839-a05c-ce6d65e146d9"} }

Packngo expects:
{ "address": { "id": ""} }

Signed-off-by: Marques Johansson <[email protected]>
@displague
Copy link
Member Author

Created equinixmetal-archive/packngo#243 from an examination of the facility API debug output.

@displague
Copy link
Member Author

I don't see any reason to rush on this. We can pick this up with #28 or merge this in advance of that related but independent metros work.

@displague displague merged commit 3bd9fc9 into main Mar 4, 2021
@displague displague mentioned this pull request Apr 9, 2021
13 tasks
@displague displague deleted the datasource_metal_facility branch July 22, 2021 12:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant