Skip to content

Commit

Permalink
fix: deprecate handlings flows as JSON
Browse files Browse the repository at this point in the history
close #122
  • Loading branch information
Skraye committed Jul 22, 2024
1 parent 0ca5c0e commit 87b4202
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func New(version string, tenant *string) func() *schema.Provider {
"keep_original_source": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Description: "Keep original source code, keeping comment and indentation.",
Description: "Keep original source code, keeping comment and indentation. Setting to false is now deprecated and will be removed in the future.",
DefaultFunc: schema.EnvDefaultFunc("KESTRA_KEEP_ORIGINAL_SOURCE", true),
},
},
Expand Down
7 changes: 7 additions & 0 deletions internal/provider/resource_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ func resourceFlowCreate(ctx context.Context, d *schema.ResourceData, meta interf
return errs
}

// Add a warning for JSON creation deprecation
diags = append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Deprecation warning",
Detail: "Creating flow not using the YAML source code is deprecated and will be soon removed.",
})

return diags
}
}
Expand Down

0 comments on commit 87b4202

Please sign in to comment.