Commit Graph

8 Commits

Author SHA1 Message Date
Tom Dyas f50c276f6e
upgrade provider to use terraform-plugin-sdk v2 (#492)
* upgrade terraform-plugin-sdk and `go mod vendor`

* Update digitalocean/datasource_digitalocean_image_test.go

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>

* Update digitalocean/datasource_digitalocean_kubernetes_cluster_test.go

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>

* Update digitalocean/datasource_digitalocean_vpc_test.go

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>

* Update digitalocean/datasource_digitalocean_vpc_test.go

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>

* go fmt

* fix droplet_id to be of the right type

* fix digitalocean_project resource

* fix creation order in digitalocean_certificate test

* fix digitalocean_container_registry data source tes

* Port new changes to v2.

* Port all tests to resource.ParallelTest

* Fix KubernetesProviderInteroperability test.

* Fix TestAccDigitalOceanKubernetesCluster_UpgradeVersion

* Fix firewall panic s/create_at/created_at/

* Fix TestAccDigitalOceanDroplet_Basic: Droplets now have private networking by default.

* Fix TestAccDataSourceDigitalOceanDomain_Basic

* Fix TestAccDataSourceDigitalOceanDropletSnapshot tests.

* Fix TestAccDataSourceDigitalOceanSSHKey_Basic

* Fix TestAccDataSourceDigitalOceanVolumeSnapshot tests.

* Fix TestAccDataSourceDigitalOceanVolume tests.

* Fix TestAccDataSourceDigitalOceanRecord_Basic

* Fix TestAccDataSourceDigitalOceanProject_NonDefaultProject

* Fix TestAccDigitalOceanImage_PublicSlug

* Fix TestAccDataSourceDigitalOceanImages_Basic via bug in imageSchema()

* go mod tidy

* Fix TestAccDataSourceDigitalOceanDroplet tests.

* Fix TestAccDataSourceDigitalOceanVPC_ByName

* Fix TestAccDataSourceDigitalOceanTag_Basic

* Fix TestAccDataSourceDigitalOceanTags_Basic

* Ensure versions are set in DBaaS tests.

* Fix TestAccDataSourceDigitalOceanApp_Basic

* Fix non-set related issues with TestAccDataSourceDigitalOceanLoadBalancer tests.

* Fix TestAccDataSourceDigitalOceanKubernetesCluster_Basic

* Remove testAccDigitalOceanKubernetesConfigWithEmptyNodePool: Empty node pools are no longer supported.

* Fix TestAccDigitalOceanProject_WithManyResources.

* Fix TestAccDigitalOceanProject_UpdateFromDropletToSpacesResource

* vendor set helpers from AWS provider

* Fix TestAccDigitalOceanFloatingIP_Droplet.

* Fix CDN panic.

* fix TestAccDigitalOceanSpacesBucket_LifecycleBasic using setutil helpers

* vendor set helpers from AWS provider

* fix TestAccDigitalOceanSpacesBucket_LifecycleBasic using setutil helpers

* Fix load balancer tests using setutil helpers.

* Fix K8s tests using setutil helpers.

* Fix TestAccDigitalOceanApp_Envs using setutil helpers.

* Fix TestAccDigitalOceanSpacesBucket_LifecycleExpireMarkerOnly using setutil helpers.

* Fix TestAccDigitalOceanFloatingIPAssignment_createBeforeDestroy

* fix remaining TypeSet tests using setutil

* Registry test can not run in parallel. One per account.

* Fix TestAccDigitalOceanProject_UpdateWithDropletResource

* Fix replica tests.

* go mod tidy

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
2020-10-16 15:50:20 -04:00
Paul Stack 655147c103 Upgrade to terraform-plugin-sdk (#321)
* Upgrade to terraform-plugin-sdk

After following the [guide](https://www.terraform.io/docs/extend/plugin-sdk.html#using-tf-sdk-migrator)

Check

```
▶ GO111MODULE=on tf-sdk-migrator check
Checking Go runtime version ...
Go version 1.12.10: OK.
Checking whether provider uses Go modules...
Go modules in use: OK.
Checking version of github.com/hashicorp/terraform-plugin-sdk to determine if provider was already migrated...
Checking version of github.com/hashicorp/terraform used in provider...
Terraform version 0.12.8: OK.
Checking whether provider uses deprecated SDK packages or identifiers...
No imports of deprecated SDK packages or identifiers: OK.

All constraints satisfied. Provider can be migrated to the new SDK.
```

Migrate

```
▶ GO111MODULE=on tf-sdk-migrator migrate
Checking Go runtime version ...
Go version 1.12.10: OK.
Checking whether provider uses Go modules...
Go modules in use: OK.
Checking version of github.com/hashicorp/terraform-plugin-sdk to determine if provider was already migrated...
Checking version of github.com/hashicorp/terraform used in provider...
Terraform version 0.12.8: OK.
Checking whether provider uses deprecated SDK packages or identifiers...
No imports of deprecated SDK packages or identifiers: OK.

All constraints satisfied. Provider can be migrated to the new SDK.

Rewriting provider go.mod file...
Rewriting SDK package imports...
Running `go mod tidy`...
Success! Provider is migrated to github.com/hashicorp/terraform-plugin-sdk v1.1.0.

It looks like this provider vendors dependencies. Don't forget to run `go mod vendor`.
Make sure to review all changes and run all tests.
```

* Fix build under go 1.13.x.
2019-10-22 17:44:03 -04:00
Andrew Starr-Bochicchio fcf0d80687 Sweeper: Add sweeper for domains. 2019-01-09 11:34:02 -05:00
Andrew Starr-Bochicchio baf11ca2cc Update all resources and datasources to use new method of accessing the godo client. 2019-01-07 18:48:17 -05:00
Andrew Starr-Bochicchio 16d9dc3368 Ensure floating_ip_assignment works with create_before_destroy (Fixes: #147). 2018-10-04 14:27:57 -04:00
Andrew Starr-Bochicchio 03751fbeeb Update floating_ip_assignment tests. 2018-09-10 13:50:12 -04:00
Justin Barrick b3cf368b67 WIP - addressing code review comments 2018-09-10 04:07:41 +00:00
Justin Barrick 1218678b80 Allows assigning an already existing floating ip to a droplet via a new resource (fixes #8).
Adds a `digitalocean_floating_ip_assignment` resource so that a floating IP that
already exists can be assigned to a droplet.

I've also added the `ignore_droplet_id` flag to the `digitalocean_floating_ip` so that
the existing floating IP resource can be used to create these IPs.

A new resource was used to prevent circular dependencies.
2018-08-22 01:15:11 +00:00