You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a kubernetes_job that sets up some initial configuration in my db when the database is created, for that I did lifecycle { replace_triggered_by = [ my_database_resource.id ] }. The thing is, I don't want this job to stick around in the cluster so I've set ttl_seconds_after_finished=0. I thought that by setting the lifecycle block the job would only be applied whenever I need to recreate the database, but because the job deletes itself from cluster it is recreated in every terraform apply that I do. It looks like a bug to me but I think it would be better to ask for opinions here first.
The code I pasted here is a simplified terraform project to reproduce this problem in case someone wants to try it locally. The principle is the same, I have a variable controlling the lifecycle and the job's ttl_seconds_after_finished set to 0.
The text was updated successfully, but these errors were encountered:
This is basically a copy of issue #2059, which unfortunately went stale due to a lack of activity. The issue is still relevant and affecting me.
Terraform version, Kubernetes provider version and Kubernetes version
Terraform configuration
Question
Hello,
I have a
kubernetes_job
that sets up some initial configuration in my db when the database is created, for that I didlifecycle { replace_triggered_by = [ my_database_resource.id ] }
. The thing is, I don't want this job to stick around in the cluster so I've setttl_seconds_after_finished=0
. I thought that by setting the lifecycle block the job would only be applied whenever I need to recreate the database, but because the job deletes itself from cluster it is recreated in everyterraform apply
that I do. It looks like a bug to me but I think it would be better to ask for opinions here first.The code I pasted here is a simplified terraform project to reproduce this problem in case someone wants to try it locally. The principle is the same, I have a variable controlling the lifecycle and the job's
ttl_seconds_after_finished
set to 0.The text was updated successfully, but these errors were encountered: