Vivekanand Nagarajan
10/25/2024, 8:40 PM│ Error: Normalized JSON Unmarshal Error │ │ with module.flows.prefect_deployment.deployment, │ on ../../modules/flows/main.tf line 7, in resource "prefect_deployment" "deployment": │ 7: resource "prefect_deployment" "deployment" { │ │ json string value is null
Caleb
10/26/2024, 12:06 AMparameters
and parameter_openapi_schema
. It's a bit confusing because the error doesn't specify what is null. You can set parameters
to an empty json object if you pass in run params elsewhere.Vivekanand Nagarajan
10/28/2024, 4:21 PM"prefect_flow" "flow" {
name = "cowsay-flow"
workspace_id = var.prefect_cloud_workspace_id
tags = ["tf-test"]
}
#
resource "prefect_deployment" "deployment" {
name = "Cowsay Example Deployment"
description = "string"
workspace_id = var.prefect_cloud_workspace_id
flow_id = prefect_flow.flow.id
entrypoint = "cowsay_example.py:cowsay_flow"
tags = ["staging"]
enforce_parameter_schema = false
parameters = jsonencode({
"creature" : "cow",
"message" :"Hello World!"
})
parameter_openapi_schema = jsonencode({
"type" : "object",
"properties" : {
"creature" : {"type": "string"}
"message" : {"type": "string"}
}
})
paused = false
storage_document_id = "eb5bbb9b-b499-4895-8932-8e366aa4b627"
version = "v1.1.1"
work_pool_name = "main"
work_queue_name = "default"
}
Vivekanand Nagarajan
10/28/2024, 4:21 PMVivekanand Nagarajan
10/28/2024, 4:24 PM│ Error: Normalized JSON Unmarshal Error │ │ with module.flows.prefect_deployment.deployment, │ on ../../modules/flows/main.tf line 7, in resource "prefect_deployment" "deployment": │ 7: resource "prefect_deployment" "deployment" { │ │ json string value is null
Vivekanand Nagarajan
10/28/2024, 4:24 PMMitch Nielsen
10/28/2024, 4:32 PMTF_LOG=debug
and see if that reports anything helpful (that error message doesn't appear to be coming from our provider from what I can see in the source code). if the debug logs don't answer the question, please open an issue in our tracker and we can try to reproduce 👍Vivekanand Nagarajan
10/28/2024, 9:49 PM│ Error: Normalized JSON Unmarshal Error │ │ with module.flows.prefect_deployment.deployment, │ on ../../modules/flows/main.tf line 7, in resource "prefect_deployment" "deployment": │ 7: resource "prefect_deployment" "deployment" { │ │ json string value is null ╵ 2024-10-28T21:47:39.083Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF" 2024-10-28T21:47:39.085Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/prefecthq/prefect/2.3.0/linux_amd64/terraform-provider-prefect_v2.3.0 pid=92 2024-10-28T21:47:39.086Z [DEBUG] provider: plugin exited [01JBAFEXR70ME9JN0GVB6ES058] Unexpected exit code when applying changes: 1 [01JBAFEXR70ME9JN0GVB6ES058] Uploading the list of managed resources...
Mitch Nielsen
10/28/2024, 9:49 PMVivekanand Nagarajan
10/28/2024, 9:51 PMVivekanand Nagarajan
10/28/2024, 9:58 PMVivekanand Nagarajan
10/28/2024, 11:31 PMVivekanand Nagarajan
10/28/2024, 11:31 PMMitch Nielsen
10/28/2024, 11:53 PMMitch Nielsen
10/29/2024, 3:19 PMMitch Nielsen
10/29/2024, 3:19 PMresource "prefect_block" "my_dbt_run_operation_block" {
name = "my-dbt-operations"
type_slug = "dbt-core-operation"
# note the "$ref" key wrapping the "block_document_id" reference
data = jsonencode({
"commands" = ["dbt deps", "dbt seed", "dbt run"]
"dbt_cli_profile" = { "$ref" : { "block_document_id" : prefect_block.my_dbt_cli_profile.id } }
})
}