Skip to content

Commit c8cbba6

Browse files
Fix wrong import
1 parent b45a694 commit c8cbba6

File tree

9 files changed

+20
-12
lines changed

9 files changed

+20
-12
lines changed

TROUBLESHOOTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ERROR: The content for this response was already consumed
3333
The following parameters were supplied, but do not correspond to any parameters defined in the template: 'parameterName'
3434
```
3535

36-
3. Check that all parameters in your notebook's `bicep_parameters` dictionary match the parameters defined in the `main.bicep` file.
36+
3. Check that all parameters in your notebook's `bicep_parameters` dictionary match the parameters defined in the `main.bicep` file.
3737

3838
**Example Fix:**
3939
If the error mentions `apimSku` parameter not found:
@@ -44,7 +44,7 @@ bicep_parameters = {
4444
'apimSku': { 'value': 'Developer' } # This parameter doesn't exist
4545
}
4646

47-
# ✅ Correct - only includes defined parameters
47+
# ✅ Correct - only includes defined parameters
4848
bicep_parameters = {
4949
'apis': { 'value': [api.to_dict() for api in apis] }
5050
}
@@ -214,7 +214,7 @@ Scroll up to see what is executed.
214214

215215
#### Bicep
216216

217-
In one case, `%USERPROFILE%\.azure\bin` contained a `bicep.exe` file but with a zero-length. The CLI would recognize that the file is there but fail on execution.
217+
In one case, `%USERPROFILE%\.azure\bin` contained a `bicep.exe` file but with a zero-length. The CLI would recognize that the file is there but fail on execution.
218218

219219
1. Verify that bicep is indeed failing: `az bicep version`
220220
2. Delete `%USERPROFILE%\.azure\bin\bicep.exe`.
@@ -234,7 +234,7 @@ Resource group 'name' could not be found
234234
1. Create the infrastructure first by running the appropriate infrastructure deployment from the `/infrastructure/` folder
235235
2. Verify the resource group name matches the expected pattern:
236236
```python
237-
rg_name = utils.get_infra_rg_name(deployment, index)
237+
rg_name = get_infra_rg_name(deployment, index)
238238
```
239239

240240
### APIM Service Not Found

samples/_TEMPLATE/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"import utils\n",
1919
"from apimtypes import *\n",
2020
"from console import print_error, print_ok\n",
21+
"from azure_resources import get_infra_rg_name\n",
2122
"\n",
2223
"# ------------------------------\n",
2324
"# USER CONFIGURATION\n",
@@ -37,7 +38,7 @@
3738
"# ------------------------------\n",
3839
"\n",
3940
"sample_folder = '_TEMPLATE'\n",
40-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
41+
"rg_name = get_infra_rg_name(deployment, index)\n",
4142
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.SIMPLE_APIM]\n",
4243
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, index = index, apim_sku = apim_sku)\n",
4344
"\n",

samples/authX-pro/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"import utils\n",
1919
"from apimtypes import *\n",
2020
"from console import print_error, print_ok\n",
21+
"from azure_resources import get_infra_rg_name\n",
2122
"\n",
2223
"# ------------------------------\n",
2324
"# USER CONFIGURATION\n",
@@ -38,7 +39,7 @@
3839
"\n",
3940
"# Create the notebook helper with JWT support\n",
4041
"sample_folder = 'authX-pro'\n",
41-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
42+
"rg_name = get_infra_rg_name(deployment, index)\n",
4243
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE, INFRASTRUCTURE.SIMPLE_APIM]\n",
4344
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, True, index = index, apim_sku = apim_sku)\n",
4445
"\n",

samples/authX/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"import utils\n",
1919
"from apimtypes import *\n",
2020
"from console import print_error, print_ok\n",
21+
"from azure_resources import get_infra_rg_name\n",
2122
"\n",
2223
"# ------------------------------\n",
2324
"# USER CONFIGURATION\n",
@@ -38,7 +39,7 @@
3839
"\n",
3940
"# Create the notebook helper with JWT support\n",
4041
"sample_folder = 'authX'\n",
41-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
42+
"rg_name = get_infra_rg_name(deployment, index)\n",
4243
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE, INFRASTRUCTURE.SIMPLE_APIM]\n",
4344
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, True, index = index, apim_sku = apim_sku)\n",
4445
"\n",

samples/azure-maps/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"import utils\n",
2323
"from apimtypes import *\n",
2424
"from console import print_error, print_info, print_ok\n",
25+
"from azure_resources import get_infra_rg_name\n",
2526
"\n",
2627
"# ------------------------------\n",
2728
"# USER CONFIGURATION\n",
@@ -41,7 +42,7 @@
4142
"# ------------------------------\n",
4243
"\n",
4344
"sample_folder = 'azure-maps'\n",
44-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
45+
"rg_name = get_infra_rg_name(deployment, index)\n",
4546
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE, INFRASTRUCTURE.SIMPLE_APIM]\n",
4647
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, index = index, apim_sku = apim_sku)\n",
4748
"azure_maps_url = 'https://atlas.microsoft.com'\n",

samples/general/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"import utils\n",
1919
"from apimtypes import *\n",
2020
"from console import print_error, print_ok\n",
21+
"from azure_resources import get_infra_rg_name\n",
2122
"\n",
2223
"# ------------------------------\n",
2324
"# USER CONFIGURATION\n",
@@ -37,7 +38,7 @@
3738
"# ------------------------------\n",
3839
"\n",
3940
"sample_folder = 'general'\n",
40-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
41+
"rg_name = get_infra_rg_name(deployment, index)\n",
4142
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE, INFRASTRUCTURE.SIMPLE_APIM]\n",
4243
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, index = index, apim_sku = apim_sku)\n",
4344
"\n",

samples/load-balancing/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"import utils\n",
1919
"from apimtypes import *\n",
2020
"from console import print_error, print_info, print_message, print_ok\n",
21+
"from azure_resources import get_infra_rg_name\n",
2122
"\n",
2223
"# ------------------------------\n",
2324
"# USER CONFIGURATION\n",
@@ -37,7 +38,7 @@
3738
"# ------------------------------\n",
3839
"\n",
3940
"sample_folder = 'load-balancing'\n",
40-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
41+
"rg_name = get_infra_rg_name(deployment, index)\n",
4142
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE]\n",
4243
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, index = index, apim_sku = apim_sku)\n",
4344
"\n",

samples/oauth-3rd-party/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"from apimtypes import *\n",
2929
"import os\n",
3030
"from console import print_error, print_info, print_ok\n",
31+
"from azure_resources import get_infra_rg_name\n",
3132
"\n",
3233
"# ------------------------------\n",
3334
"# USER CONFIGURATION\n",
@@ -48,7 +49,7 @@
4849
"\n",
4950
"# Create the notebook helper with JWT support\n",
5051
"sample_folder = 'oauth-3rd-party'\n",
51-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
52+
"rg_name = get_infra_rg_name(deployment, index)\n",
5253
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE, INFRASTRUCTURE.SIMPLE_APIM]\n",
5354
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, True, index = index, apim_sku = apim_sku)\n",
5455
"\n",

samples/secure-blob-access/create.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"import utils\n",
2121
"from apimtypes import *\n",
2222
"from console import print_error, print_info, print_ok, print_val, print_warning\n",
23+
"from azure_resources import get_infra_rg_name\n",
2324
"\n",
2425
"# ------------------------------\n",
2526
"# USER CONFIGURATION\n",
@@ -40,7 +41,7 @@
4041
"\n",
4142
"# Create the notebook helper with JWT support\n",
4243
"sample_folder = 'secure-blob-access'\n",
43-
"rg_name = utils.get_infra_rg_name(deployment, index)\n",
44+
"rg_name = get_infra_rg_name(deployment, index)\n",
4445
"supported_infras = [INFRASTRUCTURE.AFD_APIM_PE, INFRASTRUCTURE.APIM_ACA, INFRASTRUCTURE.APPGW_APIM_PE, INFRASTRUCTURE.SIMPLE_APIM]\n",
4546
"nb_helper = utils.NotebookHelper(sample_folder, rg_name, rg_location, deployment, supported_infras, True, index = index, apim_sku = apim_sku)\n",
4647
"\n",

0 commit comments

Comments
 (0)