Skip to content

Commit 23f1210

Browse files
committed
Updated INSTALL
1 parent 046382a commit 23f1210

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

INSTALL.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To get this Azure Function working, you need to:
1212
> [!NOTE]
1313
> When working with the Azure CLI, remember to use `az login` to log in to Azure, and `az logout` first if you are having problems.
1414
>
15-
> To use the convenience scripts, set your Azure settings in a local `azure.env` file that they pick up.
15+
> To use the convenience scripts, set your Azure settings in a local `azure.env` file that they pick up. You may need to change settings if you want to vary the region the Function is used in, or change its name to allow more than one to coexist in the same subscription.
1616
1717
## Creating a GitHub app
1818

@@ -98,22 +98,11 @@ Fill in the details, and click on the "Review + create" button. Make sure you se
9898

9999
#### Creating the Functions App with the Azure CLI
100100

101-
It needs your subscription ID, a resource group name, a storage account name, a location, and a function app name.
101+
It needs your subscription ID, a location, and a function app name to be set in `azure.env` in the repo directory.
102102

103-
> **TODO**: test this
103+
Only the subscription ID is necessary - the rest have defaults: you may want to change the region or the name of the function.
104104

105-
```bash
106-
AZURE_SUBSCRIPTION_ID=<subscription id>
107-
AZURE_RESOURCE_GROUP=<resource group name>
108-
AZURE_LOCATION=<location>
109-
AZURE_STORAGE_ACCOUNT=<storage account name>
110-
AZURE_FUNCTION_APP_NAME=<function app name>
111-
112-
az account set --subscription "${AZURE_SUBSCRIPTION_ID}"
113-
az group create --name "${AZURE_RESOURCE_GROUP}" --location "${AZURE_LOCATION}"
114-
az storage account create --name "${AZURE_STORAGE_ACCOUNT}" --location "${AZURE_LOCATION}" --resource-group "${AZURE_RESOURCE_GROUP}" --sku Standard_LRS
115-
az functionapp create --resource-group "${AZURE_RESOURCE_GROUP}" --consumption-plan-location "${AZURE_LOCATION}" --runtime node~18 --functions-version 3 --name "${AZURE_FUNCTION_APP_NAME}" --storage-account "${AZURE_STORAGE_ACCOUNT}"
116-
```
105+
You can use the convenience script `create-azure-function.sh`.
117106

118107
#### Creating the Functions App with the VSCode Azure Functions extension
119108

@@ -150,7 +139,7 @@ You can sync your remote settings from the app you created to the local repo.
150139

151140
You can use the Azure Functions extension in VSCode. Right-click on the Function App in the Resources pane, and select "Download remote settings" from the context menu.
152141

153-
Alternatively, you can also use the `sync-settings-remote-to-local.sh` script, after you set `azure.env` appropriately.
142+
Alternatively, you can also use the `sync-settings-remote-to-local.sh` script, after you set `azure.env` appropriately. This will save the settings to `remote.settings.json`, which you can copy to `local.settings.json`.
154143

155144
Then in your `local.settings.json` file these environment variables are defined like:
156145

0 commit comments

Comments
 (0)