Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tutorial-managed-identities-key-vault.md #97305

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions articles/spring-apps/tutorial-managed-identities-key-vault.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ This app will have access to get secrets from Azure Key Vault. Use the Azure Key
1. Use the following command to generate a sample project from `start.spring.io` with Azure Key Vault Spring Starter.

```azurecli
curl https://start.spring.io/starter.tgz -d dependencies=web,azure-keyvault-secrets -d baseDir=springapp -d bootVersion=2.3.1.RELEASE -d javaVersion=1.8 | tar -xzvf -
curl https://start.spring.io/starter.tgz -d dependencies=web,azure-keyvault -d baseDir=springapp -d bootVersion=2.7.2 -d javaVersion=1.8 | tar -xzvf -
```

1. Specify your Key Vault in your app.
Expand All @@ -158,16 +158,16 @@ This app will have access to get secrets from Azure Key Vault. Use the Azure Key
### [System-assigned managed identity](#tab/system-assigned-managed-identity)

```properties
azure.keyvault.enabled=true
azure.keyvault.uri=https://<your-keyvault-name>.vault.azure.net
spring.cloud.azure.keyvault.secret.property-sources[0].endpoint=https://<your-keyvault-name>.vault.azure.net
spring.cloud.azure.keyvault.secret.property-sources[0].credential.managed-identity-enabled=true
```

### [User-assigned managed identity](#tab/user-assigned-managed-identity)

```properties
azure.keyvault.enabled=true
azure.keyvault.uri=https://<your-keyvault-name>.vault.azure.net
azure.keyvault.client-id={Client ID of user-assigned managed identity}
spring.cloud.azure.keyvault.secret.property-sources[0].endpoint=https://<your-keyvault-name>.vault.azure.net
spring.cloud.azure.keyvault.secret.property-sources[0].credential.managed-identity-enabled=true
spring.cloud.azure.keyvault.secret.property-sources[0].credential.client-id={Client ID of user-assigned managed identity}
```

---
Expand Down Expand Up @@ -209,19 +209,19 @@ azure.keyvault.client-id={Client ID of user-assigned managed identity}
}
```

If you open the *pom.xml* file, you'll see the dependency of `azure-keyvault-secrets-spring-boot-starter`. Add this dependency to your project in your *pom.xml* file.
If you open the *pom.xml* file, you'll see the dependency of `spring-cloud-azure-starter-keyvault`.

```xml
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-keyvault-secrets-spring-boot-starter</artifactId>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-starter-keyvault</artifactId>
</dependency>
```

1. Use the following command to package your sample app.

```azurecli
mvn clean package
./mvnw clean package -DskipTests
```

1. Now you can deploy your app to Azure with the following command:
Expand Down