-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
Description
Add an option on the data source to have a similar functionality to wait_for_load_balancer from kubernetes_service resource.
Potential Terraform Configuration
Right now, when deploying traefik (with helm), I use this to get the same functionality, but seems kinda janky to do (or maybe not and I am wrong)
resource "time_sleep" "wait_60_seconds" {
count = local.enable_traefik ? 1 : 0
create_duration = "60s"
triggers = {
# always_run = timestamp()
traefik = jsonencode(helm_release.traefik[0])
}
depends_on = [helm_release.traefik]
}
data "kubernetes_service" "traefik" {
count = local.enable_traefik ? 1 : 0
metadata {
name = "traefik"
namespace = "traefik"
annotations = { tf-helm-name = "traefik-helm" }
}
depends_on = [time_sleep.wait_60_seconds[0]]
}As it can be seen, i have a time_sleep that waits 60 seconds, everytime the traefik helm deployment is changed, having the wait_for_load_balancer would make it so much easier and cleaner.
This particular use case is to register some domains that will point to traefik.
References
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
evenh, danicano10 and pinarruiz