From 1a6ec6a59995363aa1406db23e017c8e3cf194b0 Mon Sep 17 00:00:00 2001 From: zhihaoguo Date: Mon, 27 Dec 2021 10:58:56 +0800 Subject: [PATCH] Add description for role assignment in Spring Cloud Azure samples. (#127) --- .../spring-cloud-azure-cosmos-sample/README.md | 16 ++++++++++------ .../README.md | 16 ++++++++++------ .../single-property-source/README.md | 16 ++++++++++------ .../multiple-namespaces/README.md | 18 +++++++++++------- .../single-namespace/README.md | 18 +++++++++++------- .../storage-blob-sample/README.md | 16 ++++++++++------ 6 files changed, 62 insertions(+), 38 deletions(-) diff --git a/cosmos/spring-cloud-azure-starter-cosmos/spring-cloud-azure-cosmos-sample/README.md b/cosmos/spring-cloud-azure-starter-cosmos/spring-cloud-azure-cosmos-sample/README.md index 6415e2c4b..3ee178f5d 100644 --- a/cosmos/spring-cloud-azure-starter-cosmos/spring-cloud-azure-cosmos-sample/README.md +++ b/cosmos/spring-cloud-azure-starter-cosmos/spring-cloud-azure-cosmos-sample/README.md @@ -2,7 +2,7 @@ This guide walks you through the process of accessing Azure Cosmos DB with CosmosClient. -## What You Will build +## What You Will Build You will build an application that read and write data with Azure Cosmos DB using CosmosClient. ## What You Need @@ -15,9 +15,13 @@ You will build an application that read and write data with Azure Cosmos DB usin - You can also import the code straight into your IDE: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) -## Prevision Azure Resources required to run this sample +## Provision Azure Resources Required to Run This Sample +This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to: +> [!IMPORTANT] +> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource +> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource. -### Authenticate using the Azure CLI +### Authenticate Using the Azure CLI Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -93,7 +97,7 @@ Apply complete! Resources: 6 added, 0 changed, 0 destroyed. You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. -### Export output to your local environment +### Export Output to Your Local Environment Running the command below to export environment values: ```shell @@ -109,7 +113,7 @@ In your terminal, run `mvn clean spring-boot:run`. mvn clean spring-boot:run ``` -## Verify this Sample +## Verify This Sample Verify in your app’s logs that similar messages were posted: ```shell ... @@ -124,7 +128,7 @@ Exec executeQueryPrintSingleResult() is Done. ``` -## Clean up Resources +## Clean Up Resources After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your terraform project. diff --git a/cosmos/spring-cloud-azure-starter-data-cosmos/spring-cloud-azure-data-cosmos-sample/README.md b/cosmos/spring-cloud-azure-starter-data-cosmos/spring-cloud-azure-data-cosmos-sample/README.md index 0f316eb5b..b3d2703e0 100644 --- a/cosmos/spring-cloud-azure-starter-data-cosmos/spring-cloud-azure-data-cosmos-sample/README.md +++ b/cosmos/spring-cloud-azure-starter-data-cosmos/spring-cloud-azure-data-cosmos-sample/README.md @@ -1,7 +1,7 @@ # Using Spring Cloud Azure Starter Data Cosmos This guide demonstrates how to use Azure Cosmos DB via Spring Boot Starter `spring-cloud-azure-starter-data-cosmos` to store data in and retrieve data from your Azure Cosmos DB. -## What You Will build +## What You Will Build You will build an application to write data to and query data from Azure Cosmos DB via `spring-cloud-azure-starter-data-cosmos`. ## What You Need @@ -14,9 +14,13 @@ You will build an application to write data to and query data from Azure Cosmos - You can also import the code straight into your IDE: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) -## Prevision Azure Resources required to run this sample +## Provision Azure Resources Required to Run This Sample +This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to: +> [!IMPORTANT] +> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource +> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource. -### Authenticate using the Azure CLI +### Authenticate Using the Azure CLI Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -94,7 +98,7 @@ Apply complete! Resources: 6 added, 0 changed, 0 destroyed. You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. -### Export output to your local environment +### Export Output to Your Local Environment Running the command below to export environment values: ```shell @@ -110,7 +114,7 @@ In your terminal, run `mvn clean spring-boot:run`. mvn clean spring-boot:run ``` -## Verify this Sample +## Verify This Sample Verify in your app’s logs that a similar message was posted: ```shell @@ -122,7 +126,7 @@ spring-cloud-azure-data-cosmos-sample successfully run. ``` -## Clean up Resources +## Clean Up Resources After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project. diff --git a/keyvault/spring-cloud-azure-starter-keyvault-secrets/single-property-source/README.md b/keyvault/spring-cloud-azure-starter-keyvault-secrets/single-property-source/README.md index c757dce07..d865e4680 100644 --- a/keyvault/spring-cloud-azure-starter-keyvault-secrets/single-property-source/README.md +++ b/keyvault/spring-cloud-azure-starter-keyvault-secrets/single-property-source/README.md @@ -3,7 +3,7 @@ This sample illustrates the simplest usage of `spring-cloud-azure-starter-keyvault-secrets`. To learn all features, please refer to [reference doc](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#secret-management). -## What You Will build +## What You Will Build You will build an application that use `spring-cloud-azure-starter-keyvault-secrets` to retrieve secrets from [Azure Key Vault](https://azure.microsoft.com/services/key-vault/). @@ -17,9 +17,13 @@ You will build an application that use `spring-cloud-azure-starter-keyvault-secr - You can also import the code straight into your IDE: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) -## Prevision Azure Resources required to run this sample +## Provision Azure Resources Required to Run This Sample +This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to: +> [!IMPORTANT] +> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource +> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource. -### Authenticate using the Azure CLI +### Authenticate Using the Azure CLI Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -100,7 +104,7 @@ Outputs: You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. -### Export output to your local environment +### Export Output to Your Local Environment Running the command below to export environment values: ```shell @@ -116,7 +120,7 @@ In your terminal, run `mvn clean spring-boot:run`. mvn clean spring-boot:run ``` -## Verify this Sample +## Verify This Sample Start the application, you will see a log like this: @@ -125,7 +129,7 @@ property springDataSourceUrl in Azure Key Vault: this is a test value ``` -## Clean up Resources +## Clean Up Resources After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project. diff --git a/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md b/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md index cafe7d313..5624496a1 100644 --- a/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md +++ b/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md @@ -1,8 +1,8 @@ -# Using Spring Integration for Azure Service Bus with multiple destinations. +# Using Spring Integration for Azure Service Bus With Multiple Destinations This code sample demonstrates how to use Spring Integration for Azure Service Bus with multiple destinations. -## What You Will build +## What You Will Build You will build an application that using Spring Integration for Azure Service Bus to send and receive messages from one queue in one Service Bus namespace and then forward them to another queue in another Service Bus namespace. @@ -17,9 +17,13 @@ You will build an application that using Spring Integration for Azure Service Bu - You can also import the code straight into your IDE: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) -## Prevision Azure Resources required to run this sample +## Provision Azure Resources Required to Run This Sample +This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to: +> [!IMPORTANT] +> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource +> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource. -### Authenticate using the Azure CLI +### Authenticate Using the Azure CLI Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -95,7 +99,7 @@ AZURE_SERVICEBUS_NAMESPACE_02 = "${YOUR_SERVICEBUS_NAMESPACE_02}" You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. -### Export output to your local environment +### Export Output to Your Local Environment Running the command below to export environment values: ```shell @@ -113,7 +117,7 @@ mvn clean spring-boot:run ``` -## Verify this Sample +## Verify This Sample Send a POST request to service bus queue ```shell $ curl -X POST http://localhost:8080/queues?message=hello @@ -130,7 +134,7 @@ Message was sent successfully for queue2. ``` -## Clean up Resources +## Clean Up Resources After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project. diff --git a/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md b/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md index 4b02b970f..fbf0928d2 100644 --- a/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md +++ b/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md @@ -1,8 +1,8 @@ -# Using Servicebus Queue and Topic With Spring Integration +# Using Service Bus Queue and Topic With Spring Integration This guide walks you through the process of accessing Servicebus Queues and Topics with Spring Integration. -## What You Will build +## What You Will Build You will build an application that use Azure Servicebus Queues and Topics to send and receive messages with [Spring Integration](https://spring.io/projects/spring-integration) APIs. ## What You Need @@ -15,9 +15,13 @@ You will build an application that use Azure Servicebus Queues and Topics to sen - You can also import the code straight into your IDE: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) -## Prevision Azure Resources required to run this sample +## Provision Azure Resources Required to Run This Sample +This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to: +> [!IMPORTANT] +> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource +> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource. -### Authenticate using the Azure CLI +### Authenticate Using the Azure CLI Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -92,7 +96,7 @@ SERVICEBUS_NAMESPACE = "${YOUR_SERVICEBUS_NAMESPACE}" You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. -### Export output to your local environment +### Export Output to Your Local Environment Running the command below to export environment values: ```shell @@ -108,7 +112,7 @@ In your terminal, run `mvn clean spring-boot:run`. mvn clean spring-boot:run ``` -## Verify this Sample +## Verify This Sample 1. Send a POST request to service bus queue @@ -127,7 +131,7 @@ mvn clean spring-boot:run New message received: 'hello' Message 'hello' successfully checkpointed -## Clean up Resources +## Clean Up Resources After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project. diff --git a/storage/spring-cloud-azure-starter-storage-blob/storage-blob-sample/README.md b/storage/spring-cloud-azure-starter-storage-blob/storage-blob-sample/README.md index dc5673303..4a54739ca 100644 --- a/storage/spring-cloud-azure-starter-storage-blob/storage-blob-sample/README.md +++ b/storage/spring-cloud-azure-starter-storage-blob/storage-blob-sample/README.md @@ -2,7 +2,7 @@ This code sample demonstrates how to read and write files with the [Spring Resource](https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#resources) abstraction for Azure Storage using the Spring Cloud Azure storage starter. -## What You Will build +## What You Will Build You will build an application that use Spring Resource abstraction to read and write data with [Azure Storage Blob](https://azure.microsoft.com/services/storage/blobs/). ## What You Need @@ -15,9 +15,13 @@ You will build an application that use Spring Resource abstraction to read and w - You can also import the code straight into your IDE: - [IntelliJ IDEA](https://www.jetbrains.com/idea/download) -## Prevision Azure Resources required to run this sample +## Provision Azure Resources Required to Run This Sample +This sample will create Azure resources using Terraform. If you choose to run it without using Terraform to provision resources, please pay attention to: +> [!IMPORTANT] +> If you choose to use a security principal to authenticate and authorize with Azure Active Directory for accessing an Azure resource +> please refer to [Authorize access with Azure AD](https://microsoft.github.io/spring-cloud-azure/docs/current/reference/html/index.html#authorize-access-with-azure-active-directory) to make sure the security principal has been granted the sufficient permission to access the Azure resource. -### Authenticate using the Azure CLI +### Authenticate Using the Azure CLI Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -91,7 +95,7 @@ Apply complete! Resources: 6 added, 0 changed, 0 destroyed. You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. -### Export output to your local environment +### Export Output to Your Local Environment Running the command below to export environment values: ```shell @@ -107,7 +111,7 @@ In your terminal, run `mvn clean spring-boot:run`. mvn clean spring-boot:run ``` -## Verify this Sample +## Verify This Sample Send a POST request to update file contents: ```shell $ curl http://localhost:8080/blob -d "new message" -H "Content-Type: text/plain" @@ -119,7 +123,7 @@ Verify by sending a GET request $ curl -XGET http://localhost:8080/blob ``` -## Clean up Resources +## Clean Up Resources After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project.