Closed PilarIH closed 2 days ago
@PilarIH can you give us the Terraform resource you are using to create the flow?
Not reproducing, sent this message via Terrafrom, @PilarIH if you can reproduce on a newer version - please reopen the bug
this is what was created :
`provider "null" {
}
resource "null_resource" "create_kestra_flow" {
triggers = { always_run = "${timestamp()}" }
provisioner "local-exec" { command = <<EOT echo "Sending request to Kestra..." response=$(curl -X POST http://localhost:8080/api/v1/flows \ -H "Content-Type: application/x-yaml" \ -H "Authorization: Bearer eyJhbGciOiJub25lIn0.eyJzdWIiOiJhZG1pbiIsIm5iZiI6MTcyMzgwMTY3MCwicm9sZXMiOltdLCJpc3MiOiJrZXN0cmEtZWUiLCJleHAiOjE3MjM4MDUyNzAsImlhdCI6MTcyMzgwMTY3MCwidXNlciI6IjF2b1Q5R1RZVjQ0dzBBSWVKNGJKdWQifQ." \ -d ' id: testingissue118 namespace: tutorial description: "Hello World" inputs:
id: hello type: "io.kestra.plugin.scripts.python.Script" script: | print("Hello from the Python script!") print("This is another Python print statement.") ')
echo "Response from Kestra: $response"
if [ -z "$response" ]; then echo "Error: No response from server." exit 1 fi EOT } } `
Expected Behavior
When the flow is created through the UI, you can build it only with these parameters:
Actual Behaviour
When you create the flow from Terraform, the UI shows this code:
The docker and pullPolicy are added by default and since there's no image specified, it raises an error when checking the flow in the UI. The docs say nothing about docker being a required parameter and it definitely works without it.
Steps To Reproduce
Create a Kestra Flow resource through Terraform with a Python script task, apply Terraform and check the UI to see the result.
Environment Information
Example flow
No response