Skip to content

Files

Latest commit

15628a4 · Mar 7, 2022

History

History
57 lines (37 loc) · 4.13 KB

howto-manage-vnet-cli.md

File metadata and controls

57 lines (37 loc) · 4.13 KB
title description author ms.author ms.service ms.devlang ms.topic ms.date ms.custom
Manage VNet endpoints - Azure CLI - Azure Database for MariaDB
This article describes how to create and manage Azure Database for MariaDB VNet service endpoints and rules using Azure CLI command line.
savjani
pariks
mariadb
azurecli
how-to
01/26/2022
devx-track-azurecli

Create and manage Azure Database for MariaDB VNet service endpoints using Azure CLI

Virtual Network (VNet) services endpoints and rules extend the private address space of a Virtual Network to your Azure Database for MariaDB server. Using convenient Azure CLI commands, you can create, update, delete, list, and show VNet service endpoints and rules to manage your server. For an overview of Azure Database for MariaDB VNet service endpoints, including limitations, see Azure Database for MariaDB Server VNet service endpoints. VNet service endpoints are available in all supported regions for Azure Database for MariaDB.

[!INCLUDE quickstarts-free-trial-note]

[!INCLUDE azure-cli-prepare-your-environment.md]

Note

Support for VNet service endpoints is only for General Purpose and Memory Optimized servers.

Configure VNet service endpoints

The az network vnet commands are used to configure Virtual Networks. Service endpoints can be configured on virtual networks independently, by a user with write access to the virtual network.

To secure Azure service resources to a VNet, the user must have permission to "Microsoft.Network/virtualNetworks/subnets/joinViaServiceEndpoint/" for the subnets being added. This permission is included in the built-in service administrator roles, by default and can be modified by creating custom roles.

Learn more about built-in roles and assigning specific permissions to custom roles.

VNets and Azure service resources can be in the same or different subscriptions. If the VNet and Azure service resources are in different subscriptions, the resources should be under the same Active Directory (AD) tenant. Ensure that both the subscriptions have the Microsoft.Sql resource provider registered. For more information refer resource-manager-registration

Important

It is highly recommended to read this article about service endpoint configurations and considerations before configuring service endpoints. Virtual Network service endpoint: A Virtual Network service endpoint is a subnet whose property values include one or more formal Azure service type names. VNet services endpoints use the service type name Microsoft.Sql, which refers to the Azure service named SQL Database. This service tag also applies to the Azure SQL Database, Azure Database for MariaDB, PostgreSQL, and MySQL services. It is important to note when applying the Microsoft.Sql service tag to a VNet service endpoint it configures service endpoint traffic for all Azure Database services, including Azure SQL Database, Azure Database for PostgreSQL, Azure Database for MariaDB, and Azure Database for MySQL servers on the subnet.

Sample script

[!INCLUDE cli-launch-cloud-shell-sign-in.md]

Run the script

:::code language="azurecli" source="~/azure_cli_scripts/mariadb/create-mariadb-server-vnet/create-mariadb-server.sh" id="FullScript":::

Clean up deployment

[!INCLUDE cli-clean-up-resources.md]

echo "Cleaning up resources by removing the resource group..."
az group delete --name $resourceGroup -y