GalleyBytes / terraform-operator

A Kubernetes CRD to handle terraform operations
http://tf.galleybytes.com
Apache License 2.0
364 stars 47 forks source link

lastCompletedGeneration is always 0 #123

Open oskar-s9s opened 1 year ago

oskar-s9s commented 1 year ago

https://github.com/isaaguilar/terraform-operator/blob/050359562e483474fbd031d9cf758154c68b872b/pkg/controllers/terraform_controller.go#L541

lastCompletedGeneration is status is always 0 for me I would expect it to be "9" in this particular case.

status:
  lastCompletedGeneration: 0
  outputs:
    instance_ip_addr: |-
      {
XXXXXXXXXXXXXX
      }
  phase: completed
  podNamePrefix: oskarrro-testo-ko7txe2x
  stage:
    generation: 9
    interruptible: true
    podType: ""
    reason: COMPLETED_APPLY
    startTime: "2022-11-10T20:58:19Z"
    state: complete
    stopTime: "2022-11-10T20:58:19Z"
  stages: []
isaaguilar commented 1 year ago

Thanks, I'll increment the status on successful workflow executions. I didn't find that field very useful, but it should be a trivial fix.