Skip to content

Commit

Permalink
Add description for role assignment in Spring Cloud Azure samples. (#127
Browse files Browse the repository at this point in the history
)
  • Loading branch information
backwind1233 authored Dec 27, 2021
1 parent f99cfcf commit 1a6ec6a
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
...
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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:

Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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.
Expand Down

0 comments on commit 1a6ec6a

Please sign in to comment.