* doks: add auto_scale, min_nodes, max_nodes, and actual_node_count to node pool
* doks: add more auto-scaling node pool test coverage
* doks: documentation for auto-scaling node pools
* Handle case where a node pool is empty.
* Bump testClusterVersion to 1.15.5-do.0
* Implement basic schema for digitalocean_sizes data source
* Implement basic read for digitalocean_sizes data source
* Implement exact match filter and sort for digitalocean_sizes data source
* Update documentation
* Gardening: Add missing sidebar_current in the /d/sizes markdown
* Change sort schema to use List type (since order should matter when applying multiple sort)
* Rework sorting sizes to be able to handle multiple sorts in defined order
* 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.
* doks: Produce a valid kubeconfig file.
* doks: Re-add cluster_ca_certificate to example.
* Revert change to go.mod
* Make client-key-data and client-certificate-data omitempty.
* doks: Re-add cluster_ca_certificate to example in datasource as well.
* doks: bump versions to latest 1.15.3-do.3
* doks: fix acc tests to use auth token instead of certs
* doks: update docs to mention token auth in the kube config
* doks: run testacc in parallel
* doks: use alpha-prefixed random cluster and node pool names in tests
* doks: wait for node pool count in tests
* Use 'tf-acc-test-' for test resource prefix.
* datasource/database_cluster: Add password to exported attributes and mark fields sensitive.
* resource/database_replica: Expose private connection info and mark fields sensitive.
This data includes sensitive information about the cluster, such as its private
key. This prevents that data from ending up in, for example, logs on a CI system
that does a `terraform plan` as part of its build.
With this applied, a `terraform plan` or `terraform apply` instead shows:
```
...
ipv4_address = "1.2.3.4"
kube_config = (sensitive value)
name = "roboticcheese"
...
```
Also updates the acceptance tests, as 1.14.4-do.0 is no longer available.
Fixes: #260
This follows the same usage as `doctl` so not having to reset env
vars would be a better experience. This DOT NOT remove DIGITALOCEAN_TOKEN,
this just adds the ability to specify one of the two and the
provider will continue to work as expected
Fixes: #181
DigitalOcean doesn't support IPv6 private networking. Therefore,
having a parameter in the schema for this isn't correct. It has
been marked as `removed` with an appropriate error message
While still in beta, the DigitalOcean Kubernetes API automatically applied tags
from the cluster to the node pools. The provider's `filterTags` function
accounted for this by not manually applying tags found on the parent cluster
to the children node pools:
```
// we need to filter tags to remove any automatically added to avoid state problems,
// these are tags starting with "k8s:", named "k8s" or duplicates of the cluster tags
```
This does not match the current behavior of the API. See:
https://github.com/terraform-providers/terraform-provider-digitalocean/issues/184
The updated test fails without the additional changes:
```
$ make testacc TESTARGS='-run=TestAccDigitalOceanKubernetesCluster_Basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccDigitalOceanKubernetesCluster_Basic -timeout 120m
? github.com/terraform-providers/terraform-provider-digitalocean [no test files]
=== RUN TestAccDigitalOceanKubernetesCluster_Basic
--- FAIL: TestAccDigitalOceanKubernetesCluster_Basic (211.95s)
testing.go:538: Step 0 error: Check failed: 3 errors occurred:
* Check 9/30 error: digitalocean_kubernetes_cluster.foobar: Attribute 'tags.#' expected "2", got "3"
* Check 18/30 error: digitalocean_kubernetes_cluster.foobar: Attribute 'node_pool.0.tags.#' expected "2", got "1"
* Check 19/30 error: digitalocean_kubernetes_cluster.foobar: Attribute 'node_pool.0.tags.2053932785' not found
FAIL
FAIL github.com/terraform-providers/terraform-provider-digitalocean/digitalocean 211.957s
GNUmakefile:18: recipe for target 'testacc' failed
make: *** [testacc] Error 1
```
And passes with them:
```
$ make testacc TESTARGS='-run=TestAccDigitalOceanKubernetesCluster_Basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccDigitalOceanKubernetesCluster_Basic -timeout 120m
? github.com/terraform-providers/terraform-provider-digitalocean [no test files]
=== RUN TestAccDigitalOceanKubernetesCluster_Basic
--- PASS: TestAccDigitalOceanKubernetesCluster_Basic (242.73s)
PASS
ok github.com/terraform-providers/terraform-provider-digitalocean/digitalocean 242.736s
```