TritonDataCenter / terraform-provider-triton

Terraform Joyent Triton provider
https://www.terraform.io/docs/providers/triton/
Mozilla Public License 2.0
15 stars 24 forks source link

Add new `triton_fabric_network` data source. #94

Closed kwilczynski closed 6 years ago

kwilczynski commented 6 years ago

This commit adds new data source called triton_fabric_network, which allows the end-user to find details about a particular Fabric Network based on the unique name of the network, which is used as a filter.

Signed-off-by: Krzysztof Wilczynski kw@linux.com

kwilczynski commented 6 years ago

To do:

kwilczynski commented 6 years ago

Related to #93.

kwilczynski commented 6 years ago

There are no unit tests.

kwilczynski commented 6 years ago

Acceptance tests:

$ make testacc TEST=./triton TESTARGS='-run TestAccTritonFabricNetwork'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./triton -v -run TestAccTritonFabricNetwork -timeout 120m
=== RUN   TestAccTritonFabricNetwork_MissingArguments
--- PASS: TestAccTritonFabricNetwork_MissingArguments (0.01s)
=== RUN   TestAccTritonFabricNetwork_BadArguments
--- PASS: TestAccTritonFabricNetwork_BadArguments (0.00s)
=== RUN   TestAccTritonFabricNetwork_NotFound
--- PASS: TestAccTritonFabricNetwork_NotFound (6.97s)
=== RUN   TestAccTritonFabricNetwork_Basic
--- PASS: TestAccTritonFabricNetwork_Basic (29.06s)
PASS
ok      github.com/hashicorp/terraform-website/ext/providers/triton/triton  36.051s
kwilczynski commented 6 years ago

Added documentation:

localhost_4567_docs_providers_triton_d_triton_fabric_network html

stack72 commented 6 years ago

This LGTM! thanks for this @kwilczynski

terraform-provider-triton [kwilczynski-add-triton_fabric_network-data-source] % acctests triton TestAccTritonFabricNetwork_
=== RUN   TestAccTritonFabricNetwork_MissingArguments
--- PASS: TestAccTritonFabricNetwork_MissingArguments (0.00s)
=== RUN   TestAccTritonFabricNetwork_BadArguments
--- PASS: TestAccTritonFabricNetwork_BadArguments (0.00s)
=== RUN   TestAccTritonFabricNetwork_NotFound
--- PASS: TestAccTritonFabricNetwork_NotFound (7.01s)
=== RUN   TestAccTritonFabricNetwork_Basic
--- PASS: TestAccTritonFabricNetwork_Basic (27.70s)
PASS
ok      github.com/terraform-providers/terraform-provider-triton/triton 34.731s