You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-apps/includes/quickstart-deploy-restful-api-app/deploy-restful-api-app-with-consumption-plan.md
+56-56Lines changed: 56 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ author: KarlErickson
3
3
ms.author: v-shilichen
4
4
ms.service: spring-apps
5
5
ms.topic: include
6
-
ms.date: 06/9/2023
6
+
ms.date: 09/26/2023
7
7
---
8
8
9
9
<!--
@@ -42,9 +42,9 @@ Use the following steps to initialize the web application from Azure Developer C
42
42
43
43
1. Run the following command to initialize the project:
The following list describes the command interactions:
50
50
@@ -53,18 +53,18 @@ Use the following steps to initialize the web application from Azure Developer C
53
53
54
54
The console outputs messages similar to the following example:
55
55
56
-
```text
57
-
Initializing a new project (azd init)
56
+
```text
57
+
Initializing a new project (azd init)
58
58
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
61
61
62
-
Enter a new environment name: <your-env-name>
62
+
Enter a new environment name: <your-env-name>
63
63
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
+
```
68
68
69
69
---
70
70
@@ -88,26 +88,26 @@ Use the following steps to create a service instance:
88
88
89
89
:::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":::
90
90
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)**.
| Subscription | Your subscription name | The Azure subscription that you want to use foryour server. If you have multiple subscriptions, choose the subscriptionin 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. |
|**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. |
101
101
102
102
:::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":::
103
103
104
104
Use the following table as a guide for the Container Apps Environment creation:
|**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. |
111
111
112
112
:::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":::
113
113
@@ -117,7 +117,7 @@ Use the following steps to create a service instance:
117
117
118
118
1. Select **Go to resource** to open the service's **Overview** page.
119
119
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":::
121
121
122
122
> [!IMPORTANT]
123
123
> 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:
132
132
133
133
1. Go to your Azure Spring Apps instance in the Azure portal.
134
134
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**.
136
136
137
137
1. On the **Create App** page, fill in the app name *simple-todo-api* and select **Java artifacts** as the deployment type.
138
138
@@ -144,13 +144,13 @@ Use the following steps to connect your service instances:
144
144
145
145
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.
:::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":::
@@ -198,7 +198,7 @@ Use the following steps to expose your RESTful APIs in Microsoft Entra ID.
198
198
199
199
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.
200
200
201
-
1. Search for and select **Azure Active Directory**.
201
+
1. Search for and select **Microsoft Entra ID**.
202
202
203
203
1. Under **Manage**, select **App registrations** > **New registration**.
204
204
@@ -216,12 +216,12 @@ Use the following steps to expose your RESTful APIs in Microsoft Entra ID.
216
216
217
217
1. Under **Manage**, select **Expose an API** > **Add a scope**, and then enter the following information:
218
218
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**.
225
225
226
226
1. Repeat the previous step to add the two other scopes: *ToDo.Write* and *ToDo.Delete*.
227
227
@@ -233,26 +233,26 @@ Use the following steps to update the YAML file to use with your Microsoft Entra
233
233
234
234
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.
235
235
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
+
```
247
247
248
248
> [!NOTE]
249
249
> 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.
250
250
251
251
1. Use the following command to rebuild the sample project:
252
252
253
-
```bash
254
-
./mvnw clean package
255
-
```
253
+
```bash
254
+
./mvnw clean package
255
+
```
256
256
257
257
## 4. Deploy the app to Azure Spring Apps
258
258
@@ -271,9 +271,9 @@ Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-
271
271
The following list describes the command interactions:
272
272
273
273
-**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.
277
277
-**Expose public access for this app (RESTful API for SimpleTodo)?**: Enter *y*.
278
278
-**Confirm to save all the above configurations (Y/n)**: Enter *y*. If you Enter *n*, the configuration won't be saved.
279
279
@@ -283,7 +283,7 @@ Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-
283
283
./mvnw azure-spring-apps:deploy
284
284
```
285
285
286
-
The following list describes the commandinteractions:
286
+
The following list describes the command interaction:
287
287
288
288
-**OAuth2 login**: You need to authorize the login to Azure based on the OAuth2 protocol.
0 commit comments