digitalocean / terraform-provider-digitalocean

Terraform DigitalOcean provider
https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs
Mozilla Public License 2.0
509 stars 278 forks source link

Support GPU Droplets in Droplet data sources #1256

Closed andrewsomething closed 3 weeks ago

andrewsomething commented 3 weeks ago

This adds support for GPU Droplets to the digitalocean_droplet and digitalocean_droplets data sources.

$ DO_RUN_GPU_TESTS=1 make testacc TESTARGS='-run=TestAccDataSourceDigitalOceanDroplets'

=== RUN   TestAccDataSourceDigitalOceanDroplets_Basic
=== PAUSE TestAccDataSourceDigitalOceanDroplets_Basic
=== RUN   TestAccDataSourceDigitalOceanDroplets_GPUDroplet
=== PAUSE TestAccDataSourceDigitalOceanDroplets_GPUDroplet
=== CONT  TestAccDataSourceDigitalOceanDroplets_Basic
=== CONT  TestAccDataSourceDigitalOceanDroplets_GPUDroplet
--- PASS: TestAccDataSourceDigitalOceanDroplets_Basic (58.23s)
--- PASS: TestAccDataSourceDigitalOceanDroplets_GPUDroplet (92.15s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean/droplet    92.248s

$ DO_RUN_GPU_TESTS=1 make testacc TESTARGS='-run=TestAccDataSourceDigitalOceanDroplet_'

=== RUN   TestAccDataSourceDigitalOceanDroplet_BasicByName
=== PAUSE TestAccDataSourceDigitalOceanDroplet_BasicByName
=== RUN   TestAccDataSourceDigitalOceanDroplet_GPUByName
=== PAUSE TestAccDataSourceDigitalOceanDroplet_GPUByName
=== RUN   TestAccDataSourceDigitalOceanDroplet_BasicById
=== PAUSE TestAccDataSourceDigitalOceanDroplet_BasicById
=== RUN   TestAccDataSourceDigitalOceanDroplet_BasicByTag
=== PAUSE TestAccDataSourceDigitalOceanDroplet_BasicByTag
=== CONT  TestAccDataSourceDigitalOceanDroplet_BasicByName
=== CONT  TestAccDataSourceDigitalOceanDroplet_BasicById
--- PASS: TestAccDataSourceDigitalOceanDroplet_BasicByName (43.88s)
=== CONT  TestAccDataSourceDigitalOceanDroplet_BasicByTag
--- PASS: TestAccDataSourceDigitalOceanDroplet_BasicById (58.09s)
=== CONT  TestAccDataSourceDigitalOceanDroplet_GPUByName
--- PASS: TestAccDataSourceDigitalOceanDroplet_BasicByTag (57.50s)
--- PASS: TestAccDataSourceDigitalOceanDroplet_GPUByName (118.77s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean/droplet    176.919s

Due to the expense of spinning up GPU instances and potential flakiness due to capacity fluctuations, I've made the acceptance tests for these require setting an environment variable. By default, they will be skipped.