-
Notifications
You must be signed in to change notification settings - Fork 22
Closed as not planned
Closed as not planned
Copy link
Labels
Description
I'm using yamldecode to import a prefect.yaml file and convert it into a prefect_deployment resource. Unfortunately, the pull_steps validation seems too restrictive and won't let me use the prefect.yaml syntax directly.
I can work around this issue by applying replace(type, "prefect.deployment.steps.", ""). This works for my use case, but the TF provider should have parity with prefect.yaml file syntax.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Terraform Version
OpenTofu v1.9.0
on darwin_arm64
- provider registry.opentofu.org/prefecthq/prefect v2.92.1
Affected Resource(s)
- prefect_deployment
Terraform Configuration Files
resource "prefect_flow" "hello_world" {
name = "hello-world"
}
resource "prefect_deployment" "demos" {
name = "demo"
entrypoint = "example.py:hello_world"
flow_id = prefect_flow.hello_world
pull_steps = [
{
"type": "prefect.deployments.steps.git_clone",
"repository": "https://github.com/PrefectHQ/examples.git"
}
]
}Expected Behavior
Should accept any string.
See: https://docs.prefect.io/v3/how-to-guides/deployments/prefect-yaml#deployment-actions
Actual Behavior
│ Error: Invalid Attribute Value Match
│
│ with prefect_deployment.demos["crypto_prices/crypto-prices-daily"],
│ on main.tf line 76, in resource "prefect_deployment" "demos":
│ 76: resource "prefect_deployment" "demos" {
│
│ Attribute pull_steps[0].type value must be one of: ["set_working_directory" "git_clone" "pull_from_azure_blob_storage" "pull_from_gcs" "pull_from_s3"], got: "prefect.deployments.steps.git_clone"
Steps to Reproduce
terraform apply
Reactions are currently unavailable