DigitalOcean ELK machine, how could i deploy in one machine kibana and elastic with terraform

Hey, im new to devops, previously a fullstack and im trying to get familiar with deploying cloud infracstructure

im trying to use terraform to deploy in a digitalocean VM kibana and elasticsearch from ELK

i found this youtube video of a usecase but it creates 3 droplets, one for logstash, one for kibana and one for elasticsearch, i thought that a VM could sustain elastic and kibana while the logstash is installed in the machines i need to monitor

Youtube Link

can someone give me any guidance, i quite lost to be honest