confluentinc / terraform-provider-confluent

Terraform Provider for Confluent
Apache License 2.0
118 stars 61 forks source link

Confluent_Cluster_Linking conflicting with plan and apply asking for bootstrap_endpoint and rest_endpoint #376

Closed Mohapatraabhishek-lab closed 2 months ago

Mohapatraabhishek-lab commented 2 months ago

Below is my TF configuration for setting up a cluster linking resource

resource "confluent_cluster_link" "dev_basic_to_dedicated" { link_name = "basic_to_dedicated"

source_kafka_cluster { id = module.confluent_cloud.cluster.id bootstrap_endpoint = module.confluent_cloud.cluster.bootstrap_endpoint credentials { key = module.confluent_cloud.api_key.id secret = module.confluent_cloud.api_key.secret } }

destination_kafka_cluster { id = module.confluent_cloud.cluster_dedicated[0].id bootstrap_endpoint = module.confluent_cloud.cluster_dedicated[0].bootstrap_endpoint credentials { key = module.confluent_cloud.api_key_dedicated[0].id secret = module.confluent_cloud.api_key_dedicated[0].secret } }

config = { "acl.sync.enable" = "true" "auto.create.mirror.topics.enable" = "true" "consumer.offset.sync.enable" = "true" }

lifecycle { prevent_destroy = false }

depends_on = [ module.confluent_cloud ] }

While doing a terraform apply it gives me the below error (screenshot attached) image

After adding the rest_endpoint parameter it is saying that either boostrap_endpoint or the rest_endpoint is needed but not both.

image

image

It is contradicting with the two consecutive terraform apply. Please assist.

linouk23 commented 2 months ago

Thanks for creating the issue @Mohapatraabhishek-lab!

Did you get a chance to look at the following end-to-end examples might help to get started with confluent_cluster_link resource:

You should be able to find the most relevant configuration there and copy it.

Let us know if that helps!

Mohapatraabhishek-lab commented 2 months ago

yes that worked thank you.