Hi,
I have to create few resources of same type. So, I am using count/for_each for the same. Now, my requirement is like below.
The loop elements should be created sequentially because the second element depends on first one, the third element depends on second one and so on. I tried doing like below which didn’t work .
resource “confluent_environment” “confluent_kafka_environment” {
count = length(var.confluent_kafka_environment_name)
display_name = var.confluent_kafka_environment_name[count.index]
depends_on = [ confluent_environment.confluent_kafka_environment[count.index - 1] ]
}
Can someone please suggest how can I achieve it?
Waiting for the favorable response.
Thanks in advanced.