redpanda-data / terraform-provider-redpanda

Apache License 2.0
6 stars 3 forks source link

Gracefully error when invalid cluster names are provided #176

Open david-yu opened 4 weeks ago

david-yu commented 4 weeks ago

If we use an invalid name (underscore in cluster name instead of dash) we get no error message, it would be great to have a better error message in this case or some kind of validation upfront. This requires changes on the public cloud API to support better error messages.

redpanda_cluster.snowflake_bench: Creating...
╷
│ Error: failed to create cluster
│
│   with redpanda_cluster.snowflake_bench,
│   on redpanda.tf line 18, in resource "redpanda_cluster" "snowflake_bench":
│   18: resource "redpanda_cluster" "snowflake_bench" {
│
│ rpc error: code = InvalidArgument desc =
╵