Provision Terraform resources programatically

Hi, i want to implement a design pattern where a Terraform Enterprise workspace and resource creation is triggered from a application. Is this valid pattern and do we have reference implementation for this?