The reason DuploCloud uses APIs behind the scenes is that this is not just about taking user requests and generating configurations synchronously and calling the cloud provider. Such a system requires many operations to be done asynchronously, requiring a state machine with retries and the ability to detect and fix configuration drift continuously. Further, faults and compliance controls must be monitored continuously.
Terraform or for that matter any scripting approach are meant to be run with human supervision. There is no synchronicity and retries. A script start and ends.