Quick tip: To allow an automation account to run a script in an Azure database:
- Create an automation account.
- Enable the identity. In my case, I am using System assigned identity.
At the database level, I need to create a database user. Below is the script (In my case, I added it as a database owner):
CREATE USER AutomationAccountSitecore FROM EXTERNAL PROVIDER;
ALTER ROLE db_owner ADD MEMBER AutomationAccountSitecore;
Below is a simple script that updates the Azure SQL firewall and adds the Automation Account IP to the allowed list:
https://raw.githubusercontent.com/maykonrds/powershell/master/Azure/Update-SqlAzFirewall
Nenhum comentário:
Postar um comentário