You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import {
for_each = local.topics
id = "${var.config.schema_registry.id}/${each.value.name}-value/latest"
to = confluent_schema.this[each.key]
}`
Error
Error: Provider produced inconsistent final plan │ │ When expanding the plan for confluent_schema.this["test-import-topic"] to │ include new values learned so far during apply, provider │ "registry.terraform.io/confluentinc/confluent" produced an invalid new │ value for .schema: was cty.StringVal("{\n \"doc\": \"Sample schema to │ help you get started.\",\n \"fields\": [\n {\n \"doc\": │ \"The id of the order.\",\n \"name\": \"orderId\",\n │ \"type\": \"int\"\n },\n {\n \"doc\": \"Timestamp of the │ order.\",\n \"name\": \"orderTime\",\n \"type\": \"int\"\n │ },\n {\n \"doc\": \"The address of the order.\",\n │ \"name\": \"orderAddress\",\n \"type\": \"string\"\n }\n │ ],\n \"name\": \"sampleRecord\",\n \"namespace\": │ \"com.mycorp.mynamespace\",\n \"type\": \"record\"\n}"), but now │ cty.StringVal("{\"type\":\"record\",\"name\":\"sampleRecord\",\"namespace\":\"com.mycorp.mynamespace\",\"doc\":\"Sample │ schema to help you get │ started.\",\"fields\":[{\"name\":\"orderId\",\"type\":\"int\",\"doc\":\"The │ id of the │ order.\"},{\"name\":\"orderTime\",\"type\":\"int\",\"doc\":\"Timestamp of │ the order.\"},{\"name\":\"orderAddress\",\"type\":\"string\",\"doc\":\"The │ address of the order.\"}]}"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker.
The text was updated successfully, but these errors were encountered:
Hi,
We are facing an issue when importing a schema that is created through confluent cloud platform into terraform.
Terraform Version : latest
Confluent Provider Version : 1.74.0
Steps to reproduce the error:
`topics = [
{
name = "test-import-topic"
partitions = 2
schema_file_name = "test-import-topic.avsc"
}
]
locals {
topics = merge({ for topic in var.topics : topic.name => topic })
}
variable "topics" {
type = any
}
resource "confluent_schema_registry_cluster" "this" {
package = data.confluent_schema_registry_region.this.package
environment {
id = confluent_environment.this.id
}
region {
id = data.confluent_schema_registry_region.this.id
}
lifecycle {
prevent_destroy = true
}
}
resource "confluent_schema" "this" {
for_each = local.topics
schema_registry_cluster {
id = confluent_schema_registry_cluster.this.id
}
rest_endpoint = confluent_schema_registry_cluster.this.rest_endpoint
subject_name = "${each.value.name}-value"
format = "AVRO"
schema = file("${var.SCHEMAS_DIRECTORY}/${each.value.schema_file_name}")
credentials {
key = confluent_api_key.schema_registry_api_key.id
secret = confluent_api_key.schema_registry_api_key.secret
}
lifecycle {
prevent_destroy = true
}
}
import {
for_each = local.topics
id = "${var.config.schema_registry.id}/${each.value.name}-value/latest"
to = confluent_schema.this[each.key]
}`
Error
Error: Provider produced inconsistent final plan │ │ When expanding the plan for confluent_schema.this["test-import-topic"] to │ include new values learned so far during apply, provider │ "registry.terraform.io/confluentinc/confluent" produced an invalid new │ value for .schema: was cty.StringVal("{\n \"doc\": \"Sample schema to │ help you get started.\",\n \"fields\": [\n {\n \"doc\": │ \"The id of the order.\",\n \"name\": \"orderId\",\n │ \"type\": \"int\"\n },\n {\n \"doc\": \"Timestamp of the │ order.\",\n \"name\": \"orderTime\",\n \"type\": \"int\"\n │ },\n {\n \"doc\": \"The address of the order.\",\n │ \"name\": \"orderAddress\",\n \"type\": \"string\"\n }\n │ ],\n \"name\": \"sampleRecord\",\n \"namespace\": │ \"com.mycorp.mynamespace\",\n \"type\": \"record\"\n}"), but now │ cty.StringVal("{\"type\":\"record\",\"name\":\"sampleRecord\",\"namespace\":\"com.mycorp.mynamespace\",\"doc\":\"Sample │ schema to help you get │ started.\",\"fields\":[{\"name\":\"orderId\",\"type\":\"int\",\"doc\":\"The │ id of the │ order.\"},{\"name\":\"orderTime\",\"type\":\"int\",\"doc\":\"Timestamp of │ the order.\"},{\"name\":\"orderAddress\",\"type\":\"string\",\"doc\":\"The │ address of the order.\"}]}"). │ │ This is a bug in the provider, which should be reported in the provider's │ own issue tracker.
The text was updated successfully, but these errors were encountered: