Mongey / terraform-provider-confluentcloud

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

Add creation timeout parameter for resource cluster #135

Closed egor-georgiev closed 2 years ago

egor-georgiev commented 2 years ago

As per Confluent documentation, provisioning of dedicated clusters can take up to 24 hours. However, provisioning of clusters failed at due to context deadline being exceeded after 20 minutes (as per tf documentation, it's a default). This PR by @borisnaydis tried to address the issue, but changes did not remediate it. This PR adds a configurable timeout parameter for creation of clusters, which defaults to 24 hours, but can be changed in the resource configuration (snippet below). Code is tested locally and with this change it is possible to provision larger clusters to confluent without facing a timeout at around 20 minutes.

resource "confluentcloud_kafka_cluster" "cluster" {
  name             = "test_increase_create_timeout"
  service_provider = "aws"
  region           = "us-east-1"
  availability     = "HIGH"
  environment_id   = "env-abc123"
  deployment = {
    sku = "DEDICATED"
  }
  cku = 10
  timeouts {
    create = "60m"
  }
}
borisnaydis commented 2 years ago

Hi @Mongey. Did you have a chance to look at this PR? Does it need something before it can be merged?

sudiptad2017 commented 2 years ago

@Mongey Is there a chance you can merge this PR and release it. We are facing the same issue when terraform times out if Confluent takes more than 20 minutes to provision a DEDICATED cluster.