How to deploy Laravel fly app with Terraform?

So, Fly does a lot of under the hood stuff to enable laravel apps to deploy, which is fine when using the flyctl. However, when trying to use Terraform, there’s no real instructions or guidelines to deploy.

The basic example shows how to create an app, assign ips and then create a ngnix machine.

In order to deploy a laravel app, is it just using fly launch to create the .fly files, creating a nginx machine and copy pasting the services file from fly.toml into the terraform file?

Edit 1

From the looks of the machine API, it specifies using a docker image. However, the fly creates a docker file which fly would then build and run.

Is the only solution to manually create a docker image from the docker file. Then, set the machine to use the Laravel docker image?