# Terraform : getting unmarshal error: unexpected end of JSON input

**URL:** <https://community.dynatrace.com/t/terraform-getting-unmarshal-error-unexpected-end-of-json-input/53794>\
**Category:** Dynatrace Managed\
**Tags:** terraform, configuration-as-code\
**Created:** [October 20, 2025, 5:12pm UTC](https://community.dynatrace.com/t/terraform-getting-unmarshal-error-unexpected-end-of-json-input/53794 "2025-10-20T17:12:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gilles\_tabary](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gilles\_tabary](https://community.dynatrace.com/u/gilles_tabary)\
**Post date:** [October 20, 2025, 5:12pm UTC](https://community.dynatrace.com/t/terraform-getting-unmarshal-error-unexpected-end-of-json-input/53794/1 "2025-10-20T17:12:24Z")

</div>

Hello.

Trying to use [terraform provider dynatrace-oss/dynatrace](https://docs.dynatrace.com/docs/deliver/configuration-as-code/terraform)&nbsp;1.84.1 in a gitlab pipline setup.  
terraform plan works  
then  
terraform apply fail :

```markup
Error: POST https://mydynthost/e/tenentid/api/v2/settings/objects?repairInput=true: unmarshal error: unexpected end of JSON input
  with module.metric_events_ocp_K8S_Workload_alerts["ocplab1c"].dynatrace_metric_events.No_pod_ready_for_K8S_Workload,
  on modules/metric_events_ocp_K8S_Workload_alerts/ocp_No_pod_ready_for_K8S_Workload.metric_events.tf line 1, in resource "dynatrace_metric_events" "No_pod_ready_for_K8S_Workload":
   1: resource "dynatrace_metric_events" "No_pod_ready_for_K8S_Workload" {

2025-10-20T18:53:00.816+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"

```

Any one got that ? Any idea ?

Strange thing is I can run successfully these terraform plan & apply locally (outside of git). I fail to see what’s the catch. I tried&nbsp;TF\_LOG == trace with no success.

Regards.

---

<div class="post-metadata">

**Author:** ![gilles\_tabary](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@gilles\_tabary](https://community.dynatrace.com/u/gilles_tabary)\
**Post date:** [October 21, 2025, 4:11pm UTC](https://community.dynatrace.com/t/terraform-getting-unmarshal-error-unexpected-end-of-json-input/53794/2 "2025-10-21T16:11:05Z")

</div>

Fixed&nbsp;✔️

The error message is so cryptic that I did not think about this :&nbsp; problem was that network route was not open from terraform execution machine to Dynatrace API url.
