The script referenced in the MS Learn documentation is in preview - so you should consider supportability implications if you intend to target your production environment. "Easy" is a relative term - it depends on your experience with Terraform. I'd question though the reason for doing so - the primary benefit of Terraform is its support of multiple cloud platforms - is this applicable in your case? If not, you might want to simply leverage what's provided by Microsoft
hth
Marcin