kestra icon indicating copy to clipboard operation
kestra copied to clipboard

Improve the diff display in the Terraform provider's output when using `keep_original_source = true`

Open aballiet opened this issue 1 year ago • 2 comments

Expected Behavior

We expect to have a proper diff when applying changes to the content of a flow.

Actual Behaviour

Currently output is unreadable.

Steps To Reproduce

  1. Create a flow, like this one :
resource "kestra_flow" "example" {
  namespace            = "dev"
  flow_id              = "my-flow"
  keep_original_source = true
  content              = <<EOT
id: "my-flow"
namespace: "dev"
inputs:
  - name: my-value
    type: STRING

variables:
  first: "2"

tasks:
  - id: t2
    type: io.kestra.core.tasks.debugs.Echo
    format: first {{task.id}}
    level: TRACE

taskDefaults:
  - type: io.kestra.core.tasks.debugs.Echo
    values:
      format: third {{flow.id}}

EOT
}
  1. Apply your flow (create it on your Kestra instance)
  2. Change whatever row
  3. terraform plan and check diff
  4. You should have something like this : image

You can reproduce the experience with keep_original_source = false. In that case we will work as expected.

Environment Information

  • Kestra Version: 0.12 SNPASHOT
  • Operating System (OS / Docker / Kubernetes): k8s
  • Java Version (If not docker):

Example flow

No response

aballiet avatar Sep 05 '23 10:09 aballiet