vmware / terraform-provider-tanzu-mission-control

Terraform provider to manage resources of Tanzu Mission Control
Mozilla Public License 2.0
37 stars 31 forks source link

Ability to wait until the cluster is healthy #25

Closed doddatpivotal closed 2 years ago

doddatpivotal commented 2 years ago

Is your feature request related to a problem? Please describe.

Not related to a problem.

Describe the solution you'd like

I applied a terraform module that had a cluster defined. It ran through super quick. I'd like to see a means where I could wait until the creation of the cluster either failed or succeeded.

Describe alternatives you've considered

No response

Additional context

No response

shobha2626 commented 2 years ago

@doddatpivotal we have a flag (wait_until_ready) option you could use while creating a cluster, when set to true we wait (3 minutes by default) till the cluster comes up healthy.

Please refer to the example - https://github.com/vmware/terraform-provider-tanzu-mission-control/blob/main/docs/resources/tmc_cluster.md#example-usage

doddatpivotal commented 2 years ago

I missed that. I see it now. Thank you. For reference, it took my TKGS cluster 15 minutes to be created. I don't 3 minutes will be long enough. Perhaps it can be specified by the user?

shreyassreenivas commented 2 years ago

We have added a new attribute in cluster resource "ready_wait_timeout". Setting this new value will ensure that the provider will wait until the cluster is marked as READY till the timeout value is elapsed.

eg : ready_wait_timeout = "15m", will make the provider max wait for 15 mins