Skip to content

Commit 05ee73f

Browse files
committed
edits
1 parent 633e4d8 commit 05ee73f

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

articles/spring-apps/includes/quickstart-deploy-restful-api-app/deploy-restful-api-app-with-consumption-plan.md

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author: KarlErickson
33
ms.author: v-shilichen
44
ms.service: spring-apps
55
ms.topic: include
6-
ms.date: 06/9/2023
6+
ms.date: 09/26/2023
77
---
88

99
<!--
@@ -42,9 +42,9 @@ Use the following steps to initialize the web application from Azure Developer C
4242

4343
1. Run the following command to initialize the project:
4444

45-
```bash
46-
azd init --template Azure-Samples/ASA-Samples-Restful-Application
47-
```
45+
```bash
46+
azd init --template Azure-Samples/ASA-Samples-Restful-Application
47+
```
4848

4949
The following list describes the command interactions:
5050

@@ -53,18 +53,18 @@ Use the following steps to initialize the web application from Azure Developer C
5353

5454
The console outputs messages similar to the following example:
5555

56-
```text
57-
Initializing a new project (azd init)
56+
```text
57+
Initializing a new project (azd init)
5858
59-
Downloading template code to: <your-local-path>
60-
(✓) Done: Initialized git repository
59+
Downloading template code to: <your-local-path>
60+
(✓) Done: Initialized git repository
6161
62-
Enter a new environment name: <your-env-name>
62+
Enter a new environment name: <your-env-name>
6363
64-
SUCCESS: New project initialized!
65-
You can view the template code in your directory: <your-local-path>
66-
Learn more about running 3rd party code on our DevHub: https://aka.ms/azd-third-party-code-notice
67-
```
64+
SUCCESS: New project initialized!
65+
You can view the template code in your directory: <your-local-path>
66+
Learn more about running 3rd party code on our DevHub: https://aka.ms/azd-third-party-code-notice
67+
```
6868

6969
---
7070

@@ -88,26 +88,26 @@ Use the following steps to create a service instance:
8888

8989
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/create-service-instance.png" alt-text="Screenshot of the Azure portal that shows the Create a resource page with Azure Spring Apps highlighted." lightbox="../../media/quickstart-deploy-restful-api-app/create-service-instance.png":::
9090

91-
1. Fill out the **Basics** form. Use the following table as a guide for completing the form. The recommended **Plan** value is **Standard consumption & dedicated (preview)**.
91+
1. Fill out the **Basics** form. Use the following table as a guide for completing the form. The recommended **Plan** value is **Standard consumption & dedicated (preview)**.
9292

93-
| Setting | Suggested value | Description |
94-
|----------------------------|----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
95-
| Subscription | Your subscription name | The Azure subscription that you want to use for your server. If you have multiple subscriptions, choose the subscription in which you'd like to be billed for the resource. |
96-
| Resource group | *myresourcegroup* | A new resource group name or an existing one from your subscription. |
97-
| Name | *myasa* | A unique name that identifies your Azure Spring Apps service. The name must be between 4 and 32 characters long and can contain only lowercase letters, numbers, and hyphens. The first character of the service name must be a letter and the last character must be either a letter or a number. |
98-
| Plan | *Standard consumption & dedicated (preview)* | The pricing tier determines the resource and cost associated with your instance. |
99-
| Region | The region closest to your users | The location that is closest to your users. |
100-
| Container Apps Environment | *myenvironment* | Select which Container Apps environment instance to share the same virtual network with other services and resources. |
93+
| Setting | Suggested value | Description |
94+
|--------------------------------|------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
95+
| **Subscription** | Your subscription name. | The Azure subscription that you want to use for your server. If you have multiple subscriptions, choose the subscription in which you'd like to be billed for the resource. |
96+
| **Resource group** | *myresourcegroup* | A new resource group name or an existing one from your subscription. |
97+
| **Name** | *myasa* | A unique name that identifies your Azure Spring Apps service. The name must be between 4 and 32 characters long and can contain only lowercase letters, numbers, and hyphens. The first character of the service name must be a letter and the last character must be either a letter or a number. |
98+
| **Plan** | **Standard consumption & dedicated (preview)** | The pricing plan determines the resource and cost associated with your instance. |
99+
| **Region** | The region closest to your users. | The location that is closest to your users. |
100+
| **Container Apps Environment** | *myenvironment* | Select which Container Apps environment instance to share the same virtual network with other services and resources. |
101101

102102
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/create-consumption-service-basics.png" alt-text="Screenshot of the Azure portal showing the Create Azure Spring Apps consumption plan page." lightbox="../../media/quickstart-deploy-restful-api-app/create-consumption-service-basics.png":::
103103

104104
Use the following table as a guide for the Container Apps Environment creation:
105105

106-
| Setting | Suggested value | Description |
107-
|------------------|-----------------|------------------------------------------------------------------------------------------|
108-
| Environment name | *myenvironment* | A unique name that identifies your Azure Container Apps Environment service. |
109-
| Plan | *Consumption* | The pricing tier determines the resource and cost associated with your instance. |
110-
| Zone Redundant | *Disabled* | Whether to create your Container Apps Environment service in an Azure availability zone. |
106+
| Setting | Suggested value | Description |
107+
|----------------------|-----------------|------------------------------------------------------------------------------------------|
108+
| **Environment name** | *myenvironment* | A unique name that identifies your Azure Container Apps Environment service. |
109+
| **Plan** | **Consumption** | The pricing plan determines the resource and cost associated with your instance. |
110+
| **Zone Redundant** | Disabled | Whether to create your Container Apps Environment service in an Azure availability zone. |
111111

112112
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/create-apps-container-env-basics.png" alt-text="Screenshot of the Azure portal that shows the Create Azure Container Apps page." lightbox="../../media/quickstart-deploy-restful-api-app/create-apps-container-env-basics.png":::
113113

@@ -117,7 +117,7 @@ Use the following steps to create a service instance:
117117

118118
1. Select **Go to resource** to open the service's **Overview** page.
119119

120-
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/notifications.png" alt-text="Screenshot of the Azure portal that shows the Overview page with the Notifications pane open." lightbox="../../media/quickstart-deploy-restful-api-app/notifications.png":::
120+
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/notifications.png" alt-text="Screenshot of the Azure portal that shows the Overview page with the Notifications page open." lightbox="../../media/quickstart-deploy-restful-api-app/notifications.png":::
121121

122122
> [!IMPORTANT]
123123
> The Consumption workload profile has a pay-as-you-go billing model, with no starting cost. You're billed for the dedicated workload profile based on the provisioned resources. For more information, see [Workload profiles in Consumption + Dedicated plan structure environments in Azure Container Apps (preview)](../../../container-apps/workload-profiles-overview.md) and [Azure Spring Apps pricing](https://azure.microsoft.com/pricing/details/spring-apps/).
@@ -132,7 +132,7 @@ Use the following steps to connect your service instances:
132132

133133
1. Go to your Azure Spring Apps instance in the Azure portal.
134134

135-
1. From the navigation menu, open the **Apps** pane and select **Create App**.
135+
1. From the navigation menu, open **Apps**, and then select **Create App**.
136136

137137
1. On the **Create App** page, fill in the app name *simple-todo-api* and select **Java artifacts** as the deployment type.
138138

@@ -144,13 +144,13 @@ Use the following steps to connect your service instances:
144144

145145
1. Add the following environment variables for the PostgreSQL connection, and then select **Save** to finish the app configuration update. Be sure to replace the placeholders with your own values you created previously.
146146

147-
```shell
147+
```bash
148148
SPRING_DATASOURCE_URL=jdbc:postgresql://<your-PostgreSQL-server-name>:5432/<your-PostgreSQL-database-name>
149149
SPRING_DATASOURCE_USERNAME=<your-PostgreSQL-admin-user>
150150
SPRING_DATASOURCE_PASSWORD=<your-PostgreSQL-admin-password>
151151
```
152152

153-
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/consumption-app-env-variables.png" alt-text="Screenshot of the Azure portal that shows the Basics tab of the Create connection pane for connecting to PostgreSQL." lightbox="../../media/quickstart-deploy-restful-api-app/consumption-app-env-variables.png":::
153+
:::image type="content" source="../../media/quickstart-deploy-restful-api-app/consumption-app-env-variables.png" alt-text="Screenshot of the Azure portal that shows the Basics tab of the Create connection page for connecting to PostgreSQL." lightbox="../../media/quickstart-deploy-restful-api-app/consumption-app-env-variables.png":::
154154

155155
### [Azure Developer CLI](#tab/Azure-Developer-CLI)
156156

@@ -198,7 +198,7 @@ Use the following steps to expose your RESTful APIs in Microsoft Entra ID.
198198

199199
1. If you have access to multiple tenants, use the **Directory + subscription** filter (:::image type="icon" source="../../media/quickstart-deploy-restful-api-app/portal-directory-subscription-filter.png" border="false":::) to select the tenant in which you want to register an application.
200200

201-
1. Search for and select **Azure Active Directory**.
201+
1. Search for and select **Microsoft Entra ID**.
202202

203203
1. Under **Manage**, select **App registrations** > **New registration**.
204204

@@ -216,12 +216,12 @@ Use the following steps to expose your RESTful APIs in Microsoft Entra ID.
216216

217217
1. Under **Manage**, select **Expose an API** > **Add a scope**, and then enter the following information:
218218

219-
- For **Scope name**, enter `ToDo.Read`.
220-
- For **Who can consent**, select **Admins only**.
221-
- For **Admin consent display name**, enter `Read the ToDo data`.
222-
- For **Admin consent description**, enter `Allows authenticated users to read the ToDo data.`.
223-
- For **State**, keep **Enabled**.
224-
- Select **Add scope**.
219+
- For **Scope name**, enter *ToDo.Read*.
220+
- For **Who can consent**, select **Admins only**.
221+
- For **Admin consent display name**, enter *Read the ToDo data*.
222+
- For **Admin consent description**, enter *Allows authenticated users to read the ToDo data.*.
223+
- For **State**, keep **Enabled**.
224+
- Select **Add scope**.
225225

226226
1. Repeat the previous step to add the two other scopes: *ToDo.Write* and *ToDo.Delete*.
227227

@@ -233,26 +233,26 @@ Use the following steps to update the YAML file to use with your Microsoft Entra
233233

234234
1. Use the following YAML to update the `spring.cloud.azure.active-directory` configuration in the configuration file. Be sure to replace the placeholders with your own values that you created previously.
235235

236-
```yaml
237-
spring:
238-
cloud:
239-
azure:
240-
active-directory:
241-
profile:
242-
tenant-id: <your-Azure-AD-tenant-ID>
243-
credential:
244-
client-id: <your-application-ID-of-ToDo>
245-
app-id-uri: <your-application-ID-URI-of-ToDo>
246-
```
236+
```yaml
237+
spring:
238+
cloud:
239+
azure:
240+
active-directory:
241+
profile:
242+
tenant-id: <your-Azure-AD-tenant-ID>
243+
credential:
244+
client-id: <your-application-ID-of-ToDo>
245+
app-id-uri: <your-application-ID-URI-of-ToDo>
246+
```
247247
248248
> [!NOTE]
249249
> In v1.0 tokens, the configuration requires the client ID of the API, while in v2.0 tokens, you can use the client ID or the application ID URI in the request. You can configure both to properly complete the audience validation.
250250
251251
1. Use the following command to rebuild the sample project:
252252
253-
```bash
254-
./mvnw clean package
255-
```
253+
```bash
254+
./mvnw clean package
255+
```
256256

257257
## 4. Deploy the app to Azure Spring Apps
258258

@@ -271,9 +271,9 @@ Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-
271271
The following list describes the command interactions:
272272

273273
- **OAuth2 login**: You need to authorize the login to Azure based on the OAuth2 protocol.
274-
- **Select subscription**: Select the subscription list number of the Azure Spring Apps instance you created, which defaults to the first subscription in the list. If you use the default number, press Enter directly.
275-
- **Select Azure Spring Apps for deployment**: Select the number of the Azure Spring Apps instance you created. If you use the default number, press Enter directly.
276-
- **Input the app name(simple-todo-api)**: Input a name for your application deployment on Azure Spring Apps. If you use the default name, press Enter directly.
274+
- **Select subscription**: Select the subscription list number of the Azure Spring Apps instance you created, which defaults to the first subscription in the list. If you use the default number, press <kbd>Enter</kbd> directly.
275+
- **Select Azure Spring Apps for deployment**: Select the number of the Azure Spring Apps instance you created. If you use the default number, press <kbd>Enter</kbd> directly.
276+
- **Input the app name(simple-todo-api)**: Input a name for your application deployment on Azure Spring Apps. If you use the default name, press <kbd>Enter</kbd> directly.
277277
- **Expose public access for this app (RESTful API for SimpleTodo)?**: Enter *y*.
278278
- **Confirm to save all the above configurations (Y/n)**: Enter *y*. If you Enter *n*, the configuration won't be saved.
279279

@@ -283,7 +283,7 @@ Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-
283283
./mvnw azure-spring-apps:deploy
284284
```
285285

286-
The following list describes the command interactions:
286+
The following list describes the command interaction:
287287

288288
- **OAuth2 login**: You need to authorize the login to Azure based on the OAuth2 protocol.
289289

0 commit comments

Comments
 (0)