Certificate issuance failure when using terraform

Hello @eadmundo, I am trying to do the same using apps that a remote builder built from Dockerfiles upon launching the apps using flyctl launch.
Currently, I try to refactor the nice simple example into Terraform, which also uses a Dockerfile to build an image and launches it as a machine within an application.

Is your Terraform running machines within an application that it has created beforehand, or how are you building and run the application using Terraform? Would you mind sharing the (relevant parts of) your .tf configuration? Thank you.