run-x / opta

The next generation of Infrastructure-as-Code. Work with high-level constructs instead of getting lost in low-level cloud configuration.
https://docs.opta.dev
Apache License 2.0
906 stars 61 forks source link

Support for waits_for_job #894

Closed edeesis closed 2 years ago

edeesis commented 2 years ago

What would you like to be added:

Helm Release has a waits_for_job argument that will hold the terraform from completing until the jobs complete.

I would like to wait for jobs to complete before I deploy my k8s-service module.

Why is this needed:

When running migrations, you want the migrations to be complete before deploying your app code, otherwise your app could start querying a column that is not there yet, causing 500 errors.

Extra info (e.g. existing slack convo link):

https://opta-group.slack.com/archives/C0240NBKUMT/p1653335558506789?thread_ts=1653099767.603579&cid=C0240NBKUMT

Related:

https://github.com/run-x/opta/issues/893

juandiegopalomino commented 2 years ago

OK, will be in ~2 weeks

juandiegopalomino commented 2 years ago

Done!