IANAL, but I'm pretty sure writing terraform files is just fine. The issue comes when you take the source code from Terraform, package it, and resell it in some form commercially.
So, if you were AWS, you can't create "Elastic Terraform Service" using the TF source code as the base of your product.