confluentinc / terraform-provider-confluent

Terraform Provider for Confluent
Apache License 2.0
27 stars 63 forks source link

confluent_schema_exporter: optional context_type must be set #316

Closed S1M0NM closed 11 months ago

S1M0NM commented 12 months ago

While trying to create a confluent_schema_exporter resource with provider version 1.54.0 we got the following error:

Error: error creating Schema Exporter: 400 Bad Request: Cannot coerce empty String ("") to `io.confluent.schema.exporter.client.rest.entities.ExporterInfo$ContextType` value (but could if coercion was enabled using `CoercionConfig`)

We had not defined the context_type for our resource since the doc states its an optional value and it will default to AUTO but that does not seem to be the case. We configured it to AUTO in our resource definition and after we did so it worked.

[context_type](https://registry.terraform.io/providers/confluentinc/confluent/latest/docs/resources/confluent_schema_exporter#context_type) - (Optional String) Context type of the exporter. Accepted values are: CUSTOM, NONE or AUTO. Defaults to AUTO.