* 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>
* 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>
* Bump godo version.
* Initial support for app service spec.
* Update godo
* Add support for static sites.
* Refactor to share appSpecComponentBase
* Add support for workers.
* Fix expandAppDomainSpec
* Add database support.
* Add first set of acceptance tests.
* Add test excercising envs.
* Add worker test.
* Add import test.
* Add sweeper.
* Add App data source.
* Add documentation for the resource.
* Add data source docs.
* Update health_check attributes.
* Use basic plan in acceptance tests.
* Test upgrading an app from basic to professional.
* Update waitForAppDeployment method.
* Fix env docs.
* Update digitalocean/datasource_digitalocean_app_test.go
Co-authored-by: Cesar Garza <scotch.neat@live.com>
* Simplify expand methods.
* Fix typo in sweeper log message.
Co-authored-by: Cesar Garza <scotch.neat@live.com>
* Fix sweeper.
* Sweep Kubernetes clusters.
* Sweep database clusters.
* Set defaults as the sweeper does not have access to the provider DefaultFunc
* Add warning to makefile target.
* Add test using the default expiry.
* Don't ignore error when calling updateExpiredDockerCredentials.
* Set default to the new max allowed by the API.
* adding Container Registry support
* adding endpoint and docker_credentials as attributes to datasource
* updating documentation on how to use the endpoint attribute
* adding a server_url attribute
* adding tests, exporting attributes from resources, fixing go.sum, updating docs
* adding update function and splitting out generateDockerCreds into a separate function
* updating acceptance tests and docs
* Update website/docs/d/container_registry.html.md
Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* Update website/docs/d/container_registry.html.md
Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* Update website/docs/d/container_registry.html.md
Co-Authored-By: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* adding kubernetes example
* adding note about container registry beta
* removing TODOs
* partial push
* almost done, odd error in import test and waiting for final default value
* setting default for expiry_seconds and creating custom importer
* creating new resource for docker credentials
* fixed tiny bug in testing
* Update website/docs/r/container_registry_docker_credentials.html.markdown
Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* Update website/docs/r/container_registry_docker_credentials.html.markdown
Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* Final tweaks as requested
Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
* 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