azureazure-sql-databaseazure-climariadb-10.3

how do I use AZ CLI to configure Azure MariaDB to enable 'allow access to Azure services'?


I could use the below to add a vnet rule in Azure MariaDB connection security page.

az mariadb server vnet-rule create \
--resource-group xxx \
--server-name xxx-mariaDB          \
--name db-to-aks                   \
--subnet $SUBNET_ID                \
--ignore-missing-endpoint

but how do I enable the 'allow access to Azure Services' option below with AZ CLI? thanks!

enter image description here


Solution

  • We have tested this in our local environment, it is working fine.

    You can use the below cmdlet which will create a new firewall rule on MariaDB Server & it will enable Allow access to Azure services.

    az mariadb server firewall-rule create --resource-group '<RgName>' --server '<MariaDBServerName>' --name "AllowAllWindowsAzureIps" --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
    

    Here is the Sample output for reference:

    enter image description here

    For more information, You can refer to this Azure documentation about the creation of firewall rules in the Azure Maria DB Server.