Skip to content

Commit

Permalink
Add snapshot job timestamps to allow for job reruns
Browse files Browse the repository at this point in the history
  • Loading branch information
zalbiraw committed May 2, 2024
1 parent 5c5176f commit 8618e58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/tests/snapshot/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ terraform {
}

locals {
delay = (var.duration + 2) * 60
timeout = var.duration * 2
delay = (var.duration + 2) * 60
timeout = var.duration * 2
timestamp = timestamp()
}

resource "kubernetes_job" "snapshot_job" {
metadata {
name = "snapshot-job-${var.name}"
namespace = "dependencies"
labels = {
timestamp = local.timestamp
}
}

spec {
Expand Down

0 comments on commit 8618e58

Please sign in to comment.