Commit Graph

858 Commits

Author SHA1 Message Date
tf-release-bot 4354b1c917
v1.18.0 2020-05-05 19:09:26 +00:00
Andrew Starr-Bochicchio c8d2b1d346
Update CHANGELOG.md 2020-05-05 13:28:37 -04:00
Paul Stack d19034e916
Making SpacesAPI Endpoint optional (#431) 2020-05-05 13:19:45 -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
Tom Dyas 64674c727c
remove extra debug logging statement (#429) 2020-05-02 11:06:54 -04:00
tf-release-bot 2d693e07a2 Cleanup after v1.17.0 release 2020-04-28 21:38:38 +00:00
tf-release-bot 39e79e13a3
v1.17.0 2020-04-28 21:28:26 +00:00
Alex Kretzschmar 821b3dd7e4
Fixed incorrect data reference (#425)
`.data` is required to access the example vpc data.
2020-04-28 17:12:27 -04:00
Andrew Starr-Bochicchio 368a6e334f
Update CHANGELOG.md 2020-04-28 16:47:55 -04:00
Tom Dyas f21cc9106f
add digitalocean_spaces_bucket_object(s) data sources adapted from S3 (#423)
* 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>
2020-04-28 16:39:17 -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 d8c7d2ed7b
Fix handling of CAA records with iodef tag (fixes: #421). (#422) 2020-04-24 11:06:22 -04:00
Tom Dyas 11fd5a433a
add digitalocean_droplets data source (#418)
* add digitalocean_droplets data source

* add docs

* Update website/docs/d/droplets.html.md

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

* Update website/docs/d/droplets.html.md

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

* Update digitalocean/droplets.go

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

* Import strconv

Co-authored-by: Andrew Starr-Bochicchio <andrewsomething@users.noreply.github.com>
Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
2020-04-22 17:09:18 -04:00
Tom Dyas 0fea588f83
digitalocean_spaces_buckets/datasource: comment why spaces regions are hard-coded (#420) 2020-04-22 11:38:57 -04:00
Tom Dyas b9e0615705
add preliminary data sources for Spaces buckets (#416)
* 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>
2020-04-22 11:15:42 -04:00
Tom Dyas f8fc9aacb6
fix transitive dependency in go.mod (#417)
* fix transitive dependency

* Run 'go mod tidy'

Co-authored-by: Andrew Starr-Bochicchio <a.starr.b@gmail.com>
2020-04-20 17:21:34 -04:00
tf-release-bot bab8ab8705 Cleanup after v1.16.0 release 2020-04-14 17:10:29 +00:00
tf-release-bot e254439eb4
v1.16.0 2020-04-14 17:00:34 +00:00
Andrew Starr-Bochicchio dd3ee0f899
Update CHANGELOG.md 2020-04-14 10:42:29 -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
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
Andrew Starr-Bochicchio 7842bfdc65 Remove unused keys from spaces_bucket_object. 2020-04-09 09:50:49 -04:00
Andrew Starr-Bochicchio e5d71d79c7
Remove storage_class attribute from spaces_bucket_object. (#412) 2020-04-09 09:45:09 -04:00
Tom Dyas 5cd9aaf6dd
add digitalocean_spaces_bucket_object resource (#408)
* 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>
2020-04-08 14:48:02 -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
Matteo Valentini 132f587f34
Remove the validation on volume name (#406)
Let terraform check only if name exist and let the DigitalOCean APIs
validate the composition of the name.

Reverts: https://github.com/terraform-providers/terraform-provider-digitalocean/pull/386
2020-04-07 10:14:57 -04:00
Tom Dyas f25c98d80c
add spaces_endpoint config to provider (#407)
* add spaces_endpoint config to provider

* docs for spaces_endpoint

* fix message
2020-04-06 12:38:09 -04:00
Brian Hicks d5a228360e
support volumes created before name rules changed (#404)
* 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>
2020-03-31 09:45:07 -04:00
Tommy Brunn 12af297769
Validate connection pool name (#403)
* 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
2020-03-23 10:50:32 -04:00
tf-release-bot 2300b94e63 Cleanup after v1.15.1 release 2020-03-19 19:23:29 +00:00
tf-release-bot 4d2e75ce78
v1.15.1 2020-03-19 19:14:29 +00:00
Andrew Starr-Bochicchio 6a9b21ad25
Update CHANGELOG.md 2020-03-19 14:15:13 -04:00
Andrew Starr-Bochicchio 921a5435f5
Allow running KubernetesProviderInteroperability test locally. (#402)
When running the acceptance tests for https://github.com/terraform-providers/terraform-provider-digitalocean/pull/401,
I noticed failures due to my local kubeconfig file being used. This sets
`load_config_file = false` in the test.
2020-03-19 14:14:58 -04:00
Andrew Starr-Bochicchio e972ddff2c
Do not error out if terraform:default-node-pool tag is missing when reading k8s cluster. (#401)
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
2020-03-19 14:13:55 -04:00
Tommy Brunn aa45e68626
Fix volume name validation (#400)
PR #386 introduced validation of volume names that disallows dashes,
which is allowed according to DigitalOcean's API documentation: https://developers.digitalocean.com/documentation/v2/#block-storage
2020-03-19 10:14:44 -04:00
Tom Dyas 8d10c8bd0d
fix some minor issues with recently-updated docs (#398)
* fix some minor issues with recently-updated docs

* use same spelling for "data source" (with a space)
2020-03-19 10:08:02 -04:00
tf-release-bot c6f2def635 Cleanup after v1.15.0 release 2020-03-18 20:19:51 +00:00
tf-release-bot 3bc51f2a1f
v1.15.0 2020-03-18 20:10:48 +00:00
Andrew Starr-Bochicchio 3698bce1e9
Update CHANGELOG.md 2020-03-18 15:58:44 -04:00
Tom Dyas 3a3c374c3f
add digitalocean_project_resources to bind resources to externally-managed projects (#396)
* 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>
2020-03-18 15:58:19 -04:00
Andrew Starr-Bochicchio 083c9cbfcd
Make DBaaS version required due to DigitalOcean API changes. (#382)
* 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.
2020-03-17 16:46:05 -04:00
Andrew Starr-Bochicchio 62dfa05f65
Add support for MySQL user authentication management (#393)
* Add support for MySQL user auth plugin managment.

* Add docs for mysql_auth_plugin

* Update godo to 1.32.0
2020-03-17 16:44:25 -04:00
Tom Dyas 3854777ee4
default digitalocean_image to user images (#395)
* default digitialocean_image to user images source

* fix typo in keyword in docs
2020-03-10 15:31:29 -04:00
Andrew Starr-Bochicchio 4719ed200e
Update CHANGELOG.md 2020-03-10 11:34:30 -04:00
Tom Dyas 3db49fd4e2
add digitalocean_images datasource (#394)
* 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
2020-03-10 11:33:09 -04:00
Eddie Zaneski ea926e9030
Merge pull request #392 from gustavclausen/patch-1
List all exported attributes for block storage volume
2020-03-09 09:08:11 -07:00
Andrew Starr-Bochicchio 7a7177db21
Update CHANGELOG.md 2020-03-06 11:14:04 -05:00
Tom Dyas 6d890afba4
add datasource for projects (#391)
* 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
2020-03-06 10:56:35 -05:00
Gustav Kofoed Clausen bfb7d65dec List all exported attributes for block storage 2020-03-04 21:24:56 +01:00