How can i deploy to AWS sagemaker with terraform?

I see on this page, deploying a model to sagemaker is very easy with a few lines of python

This issue is version control and envrironment control. My team is using terraform to manage cloud resources and would like this be setup with terraform and not just some arbitrary python code.