* import S3 data sources
* change names to DO, strip out most unsupported features
* use spaces client; now compiles
* tests use spaces client
* initial rename of attributes in tests
* add region attribute to digitalocean_spaces_bucket_objects
* validation on region and bucket attributes
* rename files to match file naming conventions
* first attempt at working tests
* more work on tests
* remove unsupported tags attribute
* just check if version_id exists, doesn't match AWS impl
* update test resources for test of digitalocean_spaces_bucket_objects
* add force_destroy to bucket
* docs as is from AWS provider
* first pass at adapting the docs
* adjust example to be a Droplet not a EC2 instance
* more S3 -> Spaces in docs
* conform encoding test to Spaces output
* Spaces does not support ListObjectsV2 API, switch away
* update docs
* Update docs.
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
* load balancers: Fix support for multiple forwarding rules (fixes: #414).
* Remove debug statement.
* Also add multi-rule test case to the data source.
* checkpoint
* fix digitalocean_spaces_bucket datasource + test
* do not try to delete empty IDs
* add comment about race condition
* fix import ordering
* add digitalocean_spaces_buckets data source
* switch to use flattenSpacesBucket in data source
* update docs
* Fix sort example for data.digitalocean_spaces_buckets
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
* 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>
* 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.
* add from AWS provider
* rename functions for digitalocean use
* strip out features not supported by DigitalOcean
* import test file from AWS provider
* get acceptance tests to compile
* remove test sweeper since digitalocean provider is not setup for it
* use digitalocean_spaces_bucket.name (.bucket is what aws uses)
* switch back to earlier version of isAWSErr which works on earlier Go
* add docs for the resource
* remove moot comment
* rename S3 -> Spaces in log messages
* rename more methods from AWS S3 naming
* use constant for test region
* handle buckets not being removed
* get tests to compile again, remove most storage class tests
* fix resource name in test
Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* remove terraform-provider-aws as a dependency
* fix typo
* fix bucket name
* remove checks for object lock attributes
* set force_destroy on all digitalocean_spaces_bucket resources in tests
* remove unused functions
Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* 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>
* support volumes created before name rules changed
In 2019, DigitalOcean accepted volumes created with underscores in the name. In 2020, this is no longer the case but it leaves us without a way to work with volumes created in the old rules.
* Add comment on why regexp does not match message.
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
* Validate length of database connection pool name
DO currently returns a 500 if the database connection pool name is longer than 60 characters, and their
documentation states that it should be between 3 and 63 characters long.
* Sort imports
* Fix typo
In https://github.com/terraform-providers/terraform-provider-digitalocean/pull/365, a
check was added to the `digitaloceanKubernetesClusterRead` method for the
`terraform:default-node-pool` tag in order to support importing. A latter commit in
that PR added a separate `resourceDigitalOceanKubernetesClusterImportState` method
that enforces this. The Kubernetes cluster data source also uses the
`digitaloceanKubernetesClusterRead` method and should support accessing cluster
information even if a node pool is not tagged. This PR changes the errors into
warning as it is still useful for debugging.
Fixes: https://github.com/terraform-providers/terraform-provider-digitalocean/issues/399
* add digitalocean_project_resource
* update docs for digitalocean_project_resource
* allow `resources` on digitalocean_project to be computed
* rename digitalocean_project -> digitalocean_projects
* switch to managing multiple resources
* update docs for the changes to the resource
* use Id in read function
* Simplify read method further.
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
* Fix DBaaS version handling due to DigitalOcean API changes.
* Add versions to Redis and MySQL examples.
* Fix comment typo.
* Rework to make required with a custom error message.
* Add comments and reorganize.
* Add TODO comment.
* add digitalocean_images datasource and support code
* update digitalocean_image to use the common code
* add `id` as lookup attribute on digitalocean_image
and expand `name` to all images, set `private = true` to search only user images
* update documentation
* fix missing return statement
* use flattenTags function
* update digitalocean_image datasource, test, and docs
* add digitalocean_project data source
* add digitalocean_projects resource (test fails currently)
* get `digitalocean_project` DS working - return errors from flatten
* use randomly-generated project names
* get projects datasource working
* check digitalocean_project by `name`
* add documentation for digitalocean_project[s] datasources
* bug fix and test cleanups