yandex-cloud / terraform-provider-yandex

Terraform Yandex provider
https://www.terraform.io/docs/providers/yandex/
Mozilla Public License 2.0
211 stars 116 forks source link

FIX: OpenSearch - Replacing example disk sizes with more realistic #398

Closed dahnlka closed 8 months ago

dahnlka commented 11 months ago

Good evening, thank you for the release of the provider with OpenSearch support. Corrected the documentation with more realistic disk sizes, instead of exabytes the usual disk sizes are in gigabytes

mtigoev commented 11 months ago

Hi @dahnlka, Have you tried to deploy OpenSearch with suggested change?

It looks like size should be specified exactly in bytes. I got the following error when I specified suggested value:

yandex_mdb_opensearch_cluster.foo: Creating...
╷
│ Error: Error while requesting API to create OpenSearch Cluster: server-request-id = b735c9d2-0ab0-4bf9-9abe-c7719a73ef2c server-trace-id = 5315c679db36e0ef:1261d5ba74e2bed:5315c679db36e0ef:1 client-request-id = 4d2d6a3e-dc07-4f14-92ec-7aa2695630fd client-trace-id = 2a17c7cf-7f3c-4bda-b034-d995ec293ab2 rpc error: code = InvalidArgument desc = invalid disk size, must be inside [10737418240,4398046511105) range
│ 
│   with yandex_mdb_opensearch_cluster.foo,
│   on main.tf line 6, in resource "yandex_mdb_opensearch_cluster" "foo":
│    6: resource "yandex_mdb_opensearch_cluster" "foo" {
│ 
opportunity356 commented 10 months ago

Hi, thank you for Pull Request. There is a bug in documentation. Size should be specified in bytes, so the examples are correct.

Bug will be solved in https://github.com/yandex-cloud/terraform-provider-yandex/pull/404