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

data/image: Add support for `most_recent` to image data_source #23

Closed stack72 closed 7 years ago

stack72 commented 7 years ago

Fixes: #18

Will sort the images returned from the API and return the latest when requested:

% make testacc TEST=./triton TESTARGS='-run=TestAccTritonImage_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./triton -v -run=TestAccTritonImage_ -timeout 120m
=== RUN   TestAccTritonImage_basic
--- PASS: TestAccTritonImage_basic (11.28s)
=== RUN   TestAccTritonImage_mostRecent
--- PASS: TestAccTritonImage_mostRecent (13.19s)
PASS
ok      github.com/terraform-providers/terraform-provider-triton/triton 24.490s