An example on how use Azure Automation Runbook to execute operations against Azure SQL Databases.
The Terraform file creates an instance of Azure SQL Server, Database and Database Objects as well an Azure Automation Account with a RunBook that is triggered hourly to execute a Stored Procedure via PowerShell.
$ cd env/
$ az login
$ terraform init
$ terraform apply -var resource_group_name="myrg"