hi there - i have a pretty urgent request (can cre...
# ask-community
d
hi there - i have a pretty urgent request (can create a github bug ticket if necessary) - but maybe my understanding of the intended behavior for deployments/flows is off in the context of terraform. details in ๐Ÿงต cc - @Mitch Nielsen
j
Hi @David DeStefano - looking forward to hearing about your request. In the future, please refrain from tagging any Prefect team members directly - thanks!
๐Ÿ‘ 1
d
In my setup flows are one-to-one with deployments, and many deployments can map to a work pool. The work-pool represents a repo image with many flows. When I update what image the work pool should use for tasks, I tag the flow and deployment with the image tag. The problem is on subsequent releases, the prefect terraform module is causing destructive behavior to the deployment when tags are updated. terraform apply stack trace attached. You'll see the flow is attempting to be recreated, and that's causing the deployment to be dropped. But the deployment is attempting to update.
m
hmm, so changing tags on a flow currently requires it to replace the resource: https://github.com/PrefectHQ/terraform-provider-prefect/blob/89c9a7876c68d7c7e2766c4863ff7aa6a32246ad/internal/provider/resources/flow.go#L131 I wonder if that was a past limitation, because looking at the API docs now, I see
tags
in the update payload: https://app.prefect.cloud/api/docs#tag/Flows/operation/update_flow_api_accounts__account_id__workspaces__workspace_id__flows__id__patch
๐Ÿ‘€ 1
d
the only way around this right now is to remove tags from flows it appears.
also sorry for the direct ping @Mitch Nielsen - you seem to be the terraform person from past threads
i guess i can add a version to the deployment, and hopefully use that to trace what historical runs were against.
m
no worries, our team keeps an eye on the channel so you should get a response from one of us without needing to worry about pinging someone directly ๐Ÿ‘ I've probably just been the most active here lately
ack 1