Commit Graph

12 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
Andrew Starr-Bochicchio c0a4d34366
Use certificate name as primary identifier instead of ID (#500)
* Use certificate name as primary identifier instead of ID
When the certificate type is lets_encrypt, the certificate ID will change when
it's renewed, so we have to rely on the certificate name as the primary
identifier instead.

* Support running LB and cert tests in parallel

* Add state migration for Certificate resource

* Add state migration for LoadBalancer resource

* Use resource.ParallelTest for tests.

* Use a v0.12-style StateUpgrader.

* loadbalancer: Fix panic in buildLoadBalancerRequest

* Add fallback to flattenForwardingRules to prevent error state when a hardcoded UUID is used.

* Fix typo in findCertificateByName.

* Deprecate forwarding_rule.certificate_id in favor of forwarding_rule.certificate_name

* Use a v0.12-style StateUpgrader for load balancer migration.

* Handle cert ID change in CDN resource.

* Clean up structure.

* Update documentation.

Co-authored-by: Steven Normore <snormore@digitalocean.com>
2020-10-13 15:45:34 -04:00
Andrew Starr-Bochicchio add3c5f29b
load balancers: Add support for backend keepalive (Fixes: #427). (#428)
* load balancers: Add support for backend keepalive (Fixes: #427).

* Fix typo.
2020-05-04 12:59:05 -04:00
Andrew Starr-Bochicchio cf867ea6b9
load balancers: Fix support for multiple forwarding rules (fixes: #414). (#419)
* load balancers: Fix support for multiple forwarding rules (fixes: #414).

* Remove debug statement.

* Also add multi-rule test case to the data source.
2020-04-28 15:25:57 -04:00
Andrew Starr-Bochicchio a80ab4b5f9
Add support for VPC. (#410)
* Initial work on VPC supprt.

* Add VPC data source.

* Additional test cases.

* Droplet updates for VPC support.

* Kubernetes updates for VPC support.

* Load balancer updates for VPC support.

* Retry on 403 errors in delete method to prevent race condition with database cluster deletion.

* DBaaS updates for VPC support.

* Add docs on VPC resource and data source.

* Update docs for related resources.

* Clean up.

* Bump godo to v1.34.0.

* Update with ip_range and description fields.

* Update re: private_networking atribute.

* Update vpc docs to say smaller than /24 not supported.
2020-04-13 18:09:44 -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
Trent Rosenbaum 015852a3fe Updates the Load Balancer resource with a URN attribute. 2019-04-15 12:30:01 +01:00
Andrew Starr-Bochicchio f18a621d03 Add support for enabling PROXY Protocol on Load Balancers. 2019-03-25 18:39:33 -04:00
Andrew Starr-Bochicchio 79ca959956
Merge pull request #178 from terraform-providers/go1.11-upgrade-2019-01-07
[AUTOMATED] Upgrade to Go 1.11
2019-01-08 18:18:47 -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
Alex Pilon 29d16d3217
provider: Require Go 1.11 in TravisCI and README
provider: Run go fix
provider: Run go fmt
2019-01-07 17:05:13 -05:00
Tilen Faganel 78a81a8df1
Added missing datasources 2018-09-05 12:47:57 +01:00