How do I automate domain purchase from a domain provider using terraform?


I was trying to build a click-to-deploy website and e-commerce product. Now one of the aspects of that would be to automate the purchase of domains based on customer inputs. Can terraform be used to automate domain purchases?

Please let me know if it is possible with a code snippet and steps to achieve it.

Thanks in advance.