Skip to content

Commit

Permalink
Merge pull request #788 from massimobonanni/master
Browse files Browse the repository at this point in the history
Some Subscriptions have the new Environment Variables link for the App Settings in App Service and Function App
  • Loading branch information
JeffKoMS committed Apr 26, 2024
2 parents d2828ee + c74252b commit 4ce9fcb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 8 deletions.
14 changes: 13 additions & 1 deletion Instructions/Labs/AZ-204_lab_01.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ In this lab, you will explore how to create a web application on Azure by using

1. On the **App Service** blade, in the **Settings** section, select the **Configuration** link.

1. In the **Configuration** section, perform the following actions, select **Save**, and then select **Continue**.
1. If you have the tab **Application Settings** in the **Configuration** section, perform the following actions, select **Save**, and then select **Continue**.

| Setting | Action |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -173,6 +173,18 @@ In this lab, you will explore how to create a web application on Azure by using

Wait for your application settings to save before you continue with the lab.

1. If you don't have **Application settings** tab in the **Configuration** section, check if you have the link **Environment variables** in the **Settings** section, select it and perform the following actions:

| Setting | Action |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **App settings** tab | Select |
| First textbox available in the **Name** column | **StorageConnectionString** |
| Textbox on the **Value** column | Paste the storage connection string that you previously copied to Notepad |
| Click **Apply** on the bottom | This will open the confirmation pop-up |
| Click on **Confirm** in the confirmatioj Po-up | This will save the configuration value you just entered |

Wait for your application settings to save before you continue with the lab.

1. On the **App Service** blade in the Settings section, select the **Properties** link to view more information about App Services.

1. To get the App Service's URL, go to the **Overview** link, copy the value from the **Default domain** section, and then paste it to Notepad. Prepend `https://` to the domain name in Notepad. You’ll use this value later in the lab.
Expand Down
25 changes: 18 additions & 7 deletions Instructions/Labs/AZ-204_lab_07.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,31 @@ In this exercise, you created all the resources that you'll use in this lab.

1. On the **Function App** blade, select the **Configuration** option from the **Settings** section.

1. On the **Configuration** pane, on the **Application settings** tab, select **+ New application setting**.
1. If the **Configuration** pane contains the tab **Application settings**, click on it and perform the following operations:

1. In the **Add/Edit application setting** pop-up window, in the **Name** text box, enter **StorageConnectionString**.

1. In the **Value** text box, construct a value by using the following syntax: `@Microsoft.KeyVault(SecretUri=<Secret Identifier>)`, where the `<Secret Identifier>` placeholder represents the secret identifier you recorded earlier in this exercise.
- Select **+ New application setting**.
- In the **Add/Edit application setting** pop-up window, in the **Name** text box, enter **StorageConnectionString**.
- In the **Value** text box, construct a value by using the following syntax: `@Microsoft.KeyVault(SecretUri=<Secret Identifier>)`, where the `<Secret Identifier>` placeholder represents the secret identifier you recorded earlier in this exercise.

> **Note**: For example, if your secret identifier is `https://securevaultstudent.vault.azure.net/secrets/storagecredentials/17b41386df3e4191b92f089f5efb4cbf`, the resulting value would be `@Microsoft.KeyVault(SecretUri=https://securevaultstudent.vault.azure.net/secrets/storagecredentials/17b41386df3e4191b92f089f5efb4cbf)`.
1. Leave the **deployment slot setting** check box set to its default value (not selected), and then select **OK** to close the pop-up window and to return to the **Configuration** section.

1. Select **Save** to save your settings, and then in the **save Changes** confirmation pop-up dialog box, select **Continue**.
- Leave the **deployment slot setting** check box set to its default value (not selected), and then select **OK** to close the pop-up window and to return to the **Configuration** section.
- Select **Save** to save your settings, and then in the **save Changes** confirmation pop-up dialog box, select **Continue**.

> **Note**: Wait for your application settings to save before you continue with the lab.
1. If the **Configuration** pane doesn't contain the tab **Application settings**, select the **Environment Variables** from the **Settings** section and perform the following operations:

- Select the **App settings** tab.
- Enter **StorageConnectionString** in the first textbox available in the column **Name**.
- In the textbox availabl on the right (in the column **Value**), enter a value construct by using the following syntax: `@Microsoft.KeyVault(SecretUri=<Secret Identifier>)`, where the `<Secret Identifier>` placeholder represents the secret identifier you recorded earlier in this exercise.

> **Note**: For example, if your secret identifier is `https://securevaultstudent.vault.azure.net/secrets/storagecredentials/17b41386df3e4191b92f089f5efb4cbf`, the resulting value would be `@Microsoft.KeyVault(SecretUri=https://securevaultstudent.vault.azure.net/secrets/storagecredentials/17b41386df3e4191b92f089f5efb4cbf)`.
- Leave the **deployment slot setting** check box set to its default value (not selected), and then select **Apply** the value you enter and click on **Confirm** to confirm the operation.

> **Note**: Wait for your application settings to save before you continue with the lab.
#### Review

In this exercise, you created a system-assigned managed service identity for your function app, and then gave that identity the appropriate permissions to get the value of a secret in your key vault. Finally, you created a secret that you referenced within your function app's configuration settings.
Expand Down

0 comments on commit 4ce9fcb

Please sign in to comment.