Skip to content

Commit

Permalink
Fix flow background update (#566)
Browse files Browse the repository at this point in the history
This change fixes #482 so that the flow background can be changed.
  • Loading branch information
BeryJu authored Sep 27, 2024
2 parents 5ba2f9e + b338c17 commit 8072b60
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/provider/resource_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@ func resourceFlowUpdate(ctx context.Context, d *schema.ResourceData, m interface
}

d.SetId(res.Slug)

if bg, ok := d.GetOk("background"); ok {
hr, err := c.client.FlowsApi.FlowsInstancesSetBackgroundUrlCreate(ctx, res.Slug).FilePathRequest(api.FilePathRequest{
Url: bg.(string),
}).Execute()
if err != nil {
return httpToDiag(d, hr, err)
}
}
return resourceFlowRead(ctx, d, m)
}

Expand Down

0 comments on commit 8072b60

Please sign in to comment.