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 e5212e4069
spaces_bucket: Region attribute should be ForceNew. (#413) 2020-04-14 10:28:32 -04:00
Tom Dyas 61c7bea9cb
digitalocean_spaces_bucket: add lifecycle_rule support (#411)
* adapt lifecycle_rule code from aws_s3_bucket

commented out tags code

* copy in acceptance tests w/ minimal adapation

* fix rebasing conflict

* more renaming and removal of unsupported features

* remove tags from tests

* remove more storage classes

* import did not work since default region not set during import

* remove storage class related attributes

* add warning about keys starting with /

Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>

* remove duplicate definition of isAWSError due to merge conflict

* add abort_incomplete_multipart_upload_days test plus some cleanups

* refactor setup of S3 client in tests

* another region fix

* document lifecycle_rule

* remove debugging logs statements

* remove moot method (since transitions were removed)

* remove TestAccDigitalOceanSpacesBucket_LifecycleRule_Expiration_EmptyConfigurationBlockw

* add AtleastOneOf config for expiration arguments

* Revert "add AtleastOneOf config for expiration arguments"

This reverts commit c70557be53de67ec9a4063e4fa858e375c9fe5a5.

Doesn't seem to work in sub-arguments

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
2020-04-14 10:17:52 -04:00
Tom Dyas d7f2efda35
digitalocean_spaces_bucket: support bucket versioning (#409)
* digitalocean_spaces_bucket: support bucket versioning

* document versioning argument

* remove debugging code

* Update digitalocean/resource_digitalocean_spaces_bucket.go

Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>

* test that removing the versioning block will disable versionin

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
2020-04-07 11:53:32 -04:00
Poh Zi How cb610c9ad0 Add support for spaces CORS (#322)
* add support for spaces CORS

* Ensure CORS rules are set on bucket creation.

* Add test case for multiple CORS rules.

* Add to CORS to docs.
2019-10-22 19:10:12 -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 f03e5252c3 Simplify Spaces bucket importing and test error case when importing non-existent resource. 2019-05-10 15:55:41 -04:00
Andrew Starr-Bochicchio 6bcec8d3b5
Merge pull request #210 from opencredo/feature/introduce-urn-attribute-to-spaces
Updates the spaces resource to expose the urn.
2019-04-15 12:28:17 -04:00
Trent Rosenbaum 58d71ec2cf Updates the spaces resource to expose the urn. 2019-04-15 16:58:08 +01:00
Thomas Kooi 6383907e19
Normalize case for region attribute across all resources
Fix #208
2019-04-14 13:36:30 +02:00
Andrew Starr-Bochicchio 399c49d93f Add force_destroy and bucket_domain_name to schema and docs. 2019-01-08 14:06:30 -05:00
Andrew Starr-Bochicchio 14793446d9 Rename resource to digitalocean_spaces_bucket. 2019-01-08 12:21:53 -05:00
Renamed from digitalocean/resource_digitalocean_bucket.go (Browse further)