Parse terraform plan programmatically in a provider

HI, I have a fairly complex terraform plan which I need ability to parse programmatically and extract values of each element. Is there a recommended way to extract elements from the plan using the terraform plugin framework

I need ability to loop through elements with arrays and extract values.

resource “resource_type” “resource_name” {
name = “test-intake-api"
type = “stateless-webservice”
version = 1

resources {
cpuLimit = “4”
cpuRequest = “2”
memoryLimit = “1G”
memoryRequest = “500M”
}

readiness ={
  http_get ={
    host = "localhost"
    path = "/health-check"
    port = 8080
    scheme = "HTTP"

    http_headers ={
      name = "x-api-key"
      value = “heheh”
    }
  }

  initial_delay_seconds = 10
  period_seconds = 2
  timeout_seconds = 10
  success_threshold = 3
  failure_threshold = 5
}

}

routing = {
host ={
enabled = false
hostname = “string”
custom_domains = [
“”
]
}

paths = {
  exact ={
    path = "/"
    rewrite = "/new-path"
  }

  prefix =  {
    path = "/"
    rewrite = "/new-path"
  }

  regex ={
  path = "/"
  rewrite = "/new-path"
  }
}

}
}