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

Terraform keeps forcing new resource on unchanged cluster

Open nbommu1 opened this issue 3 years ago • 7 comments

Hi,

I have an issue on cluster in confluent cloud, it keeps forcing new resource on unchanged cluster.

`-/+ confluentcloud_kafka_cluster.test (new resource required) id: "lkc-nkqz6" => (forces new resource) availability: "LOW" => "LOW" bootstrap_servers: "SASL_SSL://pkc-4nym6.us-east-1.aws.confluent.cloud:9092" => deployment.%: "1" => "0" (forces new resource) deployment.sku: "BASIC" => "" (forces new resource) environment_id: "env-7qnnp" => "env-7qnnp" name: "provider-test" => "provider-test" network_egress: "100" => "100" network_ingress: "100" => "100" region: "us-east-1" => "us-east-1" service_provider: "aws" => "aws" storage: "5000" => "5000"

` what are default values to set deployment?

thanks Niranjan

nbommu1 avatar Aug 06 '20 18:08 nbommu1

@nbommu1 What version of the provider are you using? can you try 0.0.3, it should fix this.

Mongey avatar Aug 06 '20 18:08 Mongey

I was trying with ver 0.0.3 downloaded from below url.

https://github.com/Mongey/terraform-provider-confluentcloud/releases/tag/v0.0.3

nbommu1 avatar Aug 06 '20 18:08 nbommu1

I rebuilt the module from the source, now it works.

No changes. Infrastructure is up-to-date.

nbommu1 avatar Aug 06 '20 19:08 nbommu1

when I build that from source still I have to define this in my terraform, is this right way to do this? deployment: { "sku": "BASIC" }

nbommu1 avatar Aug 11 '20 22:08 nbommu1

another error when I create cluster with availability: "HIGH ' Terraform v0.11.14 provider.confluentcloud v0.0.3 provider.kafka v0.2.9

error: Error applying plan:

1 error occurred: * confluentcloud_kafka_cluster.nonprod-test: 1 error occurred: * confluentcloud_kafka_cluster.nonprod-test: clusters: Creating multi zone cluster is not eligible for the sku.: durability: Creating multi zone cluster is not eligible for the sku.BASIC `

nbommu1 avatar Aug 11 '20 22:08 nbommu1

intersting, if build the module from the source it works fine, here is my terraform.

resource "confluentcloud_kafka_cluster" "test" {
  name             = "test"
  service_provider = "aws"
  region           = "us-east-1"
  availability     = "HIGH"
  environment_id   = confluentcloud_environment.environment.id
  network_egress = 100
  network_ingress = 100
  storage    = 5000
  deployment = { "sku": "STANDARD" }
}
confluentcloud_service_account.test: Creating...
confluentcloud_kafka_cluster.test: Creating...
confluentcloud_kafka_cluster.test: Creation complete after 1s [id=lkc-8g977]
confluentcloud_api_key.test: Creating...
confluentcloud_api_key.test: Creation complete after 0s [id=104398]
kafka_topic.nbommu-test: Creating...

nbommu1 avatar Aug 12 '20 15:08 nbommu1

@nbommu1 - I have no issue with version 0.0.5 Please pay attention to parameters ( I had a similar issue when did not specify all parameters) Your previous snippet from https://github.com/Mongey/terraform-provider-confluentcloud/issues/26#issuecomment-672954752 looks valid. PS: Please close the issue if it is working as expected :)

rjudin avatar Oct 15 '20 09:10 rjudin