terraform-provider-kafka icon indicating copy to clipboard operation
terraform-provider-kafka copied to clipboard

Force replacement on illegal transition

Open rojopolis opened this issue 4 years ago • 3 comments

We get errors similar to this from time to time:

Error: Altering topic configuration from `delete` to `compact` is not supported. Please create a new topic with `compact` policy specified instead.

Terraform should be able to detect that a resource needs to be recreated rather than updated.

rojopolis avatar Jun 25 '20 21:06 rojopolis

I believe the error message is specific to Confluent Cloud. See "Important Note" in https://docs.confluent.io/current/cloud/using/broker-config.html

k2n avatar Jun 26 '20 00:06 k2n

I was wondering if we could do something similar to dry-run in cloud:

https://docs.confluent.io/current/cloud/cli/command-reference/ccloud_kafka_topic_update.html

To detect if the config change is valid. If it’s just that one setting we could just special case it in the provider.

Robert Jordan

On Jun 25, 2020, at 5:54 PM, Kenji Nakamura [email protected] wrote:

 I believe the error message is specific to Confluent Cloud. See "Important Note" in https://docs.confluent.io/current/cloud/using/broker-config.html

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rojopolis avatar Jun 26 '20 00:06 rojopolis

This might be possible to do, by issuing an AlterConfigs request with validate_only set during the plan phase.

Mongey avatar Jun 26 '20 01:06 Mongey