Mongey / terraform-provider-confluentcloud

A Terraform provider for managing resource in confluent.cloud
MIT License
110 stars 47 forks source link

Terraform keeps forcing new resource on unchanged cluster #26

Open nbommu1 opened 4 years ago

nbommu1 commented 4 years ago

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

Mongey commented 4 years ago

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

nbommu1 commented 4 years ago

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 commented 4 years ago

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

No changes. Infrastructure is up-to-date.

nbommu1 commented 4 years ago

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 commented 4 years ago

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:

nbommu1 commented 4 years ago

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...
rjudin commented 4 years ago

@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 :)