Shellscript variable to another resource in terraform

Hi All, We are planning to create a terraform resource for creating private hosted Zone and associate a load balancer to the private hosted zone but to get the load balancer name we have to run a shell script. Is there a way I can pass the output of the shell script as a variable to the private hosted zone resource.