Skip to content

Commit e82021c

Browse files
authored
Merge pull request #229001 from KarlErickson/ml-sc-extension2
edit "Add Service Connector extension install command #228866"
2 parents b794965 + e6ab3e3 commit e82021c

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

articles/spring-apps/connect-managed-identity-to-azure-sql.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,27 @@ spring.datasource.url=jdbc:sqlserver://$AZ_DATABASE_NAME.database.windows.net:14
6464
Configure your app deployed to Azure Spring to connect to an SQL Database with a system-assigned managed identity using the `az spring connection create` command, as shown in the following example.
6565

6666
> [!NOTE]
67-
> This command requires you to run [Azure CLI](/cli/azure/install-azure-cli) version 2.41.0 or higher.
68-
69-
```azurecli-interactive
70-
az spring connection create sql \
71-
--resource-group $SPRING_APP_RESOURCE_GROUP \
72-
--service $Spring_APP_SERVICE_NAME \
73-
--app $APP_NAME --deployment $DEPLOYMENT_NAME \
74-
--target-resource-group $SQL_RESOURCE_GROUP \
75-
--server $SQL_SERVER_NAME \
76-
--database $DATABASE_NAME \
77-
--system-identity
78-
```
67+
> These commands require [Azure CLI](/cli/azure/install-azure-cli) version 2.45.0 or higher.
68+
69+
1. Install the Service Connector passwordless extension for the Azure CLI.
70+
71+
```azurecli
72+
az extension add --name serviceconnector-passwordless --upgrade
73+
```
74+
75+
1. Run the `az spring connection create` command, as shown in the following example.
76+
77+
```azurecli
78+
az spring connection create sql \
79+
--resource-group $SPRING_APP_RESOURCE_GROUP \
80+
--service $SPRING_APP_SERVICE_NAME \
81+
--app $APP_NAME \
82+
--deployment $DEPLOYMENT_NAME \
83+
--target-resource-group $SQL_RESOURCE_GROUP \
84+
--server $SQL_SERVER_NAME \
85+
--database $DATABASE_NAME \
86+
--system-identity
87+
```
7988

8089
---
8190

articles/spring-apps/how-to-bind-mysql.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ With Azure Spring Apps, you can bind select Azure services to your applications
2424

2525
* An application deployed to Azure Spring Apps. For more information, see [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md).
2626
* An Azure Database for MySQL Flexible Server instance.
27-
* [Azure CLI](/cli/azure/install-azure-cli) version 2.41.0 or higher.
27+
* [Azure CLI](/cli/azure/install-azure-cli) version 2.45.0 or higher.
2828

2929
## Prepare your Java project
3030

@@ -49,19 +49,27 @@ With Azure Spring Apps, you can bind select Azure services to your applications
4949

5050
### [Service Connector](#tab/Service-Connector)
5151

52-
To configure your Spring app to connect to an Azure Database for MySQL Flexible Server with a system-assigned managed identity, use the `az spring connection create` command, as shown in the following example.
53-
54-
```azurecli
55-
az spring connection create mysql-flexible \
56-
--resource-group $AZURE_SPRING_APPS_RESOURCE_GROUP \
57-
--service $AZURE_SPRING_APPS_SERVICE_INSTANCE_NAME \
58-
--app $APP_NAME \
59-
--deployment $DEPLOYMENT_NAME \
60-
--target-resource-group $MYSQL_RESOURCE_GROUP \
61-
--server $MYSQL_SERVER_NAME \
62-
--database $DATABASE_NAME \
63-
--system-assigned-identity
64-
```
52+
Follow these steps to configure your Spring app to connect to an Azure Database for MySQL Flexible Server with a system-assigned managed identity.
53+
54+
1. Install the Service Connector passwordless extension for the Azure CLI.
55+
56+
```azurecli
57+
az extension add --name serviceconnector-passwordless --upgrade
58+
```
59+
60+
1. Run the `az spring connection create` command, as shown in the following example.
61+
62+
```azurecli
63+
az spring connection create mysql-flexible \
64+
--resource-group $AZURE_SPRING_APPS_RESOURCE_GROUP \
65+
--service $AZURE_SPRING_APPS_SERVICE_INSTANCE_NAME \
66+
--app $APP_NAME \
67+
--deployment $DEPLOYMENT_NAME \
68+
--target-resource-group $MYSQL_RESOURCE_GROUP \
69+
--server $MYSQL_SERVER_NAME \
70+
--database $DATABASE_NAME \
71+
--system-assigned-identity
72+
```
6573

6674
### [Service Binding](#tab/Service-Binding)
6775

0 commit comments

Comments
 (0)