Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonh-msft committed Apr 14, 2020
1 parent 98f4a05 commit 101bafc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ Type 'yes' and Terraform will work its magic.

### 6. Add the App Setting for the Application Insights KeyVault secret to the Function App

Once Terraform completes it will output some values. One of which is `run_this_to_connect_function_to_app_insights`. Take this value, it will look like `az functionapp config appsettings set -n bhsamptest2 -g serverless-sample-bhsamptest2 --settings "APPINSIGHTS_INSTRUMENTATIONKEY= ...` and run it in the current terminal window. This adds the App Settings KeyVault reference to the KeyVault secret containing the Application Insights Instrumentation Key for the first App Insights instance.
An output from the Terraform is a deployment script you must run in order to populate the Function App's application setting for Application Insights as well as actually deploy the Function code. In your VSCode bash terminal window, simply run

> Note: We can't do this as part of Terraform (yet) because it will erase all other App Settings if we deploy via ARM template, and there's a race condition between the Function App and they KeyVault if we try to embed it as part of the Function App's deployment. In a production scenario this would be done as part of the DevOps pipeline being used to execute the Terraform plan.
### 7. Deploy the Azure Function code
```
./deploy_app.sh
```

The other output from terraform is the Azure Functions CLI command you need to run to deploy the Function app also contained within the sample. Doing this will issue a full publish out to Azure to the Function App slot created by Terraform.
from the `terraform/` directory you're in after running `terraform apply`.

> Note: In a production scenario this would be done as part of the DevOps pipeline being used to execute the Terraform plan.
> Note: We can't set the APPINSIGHTS_INSTRUMENTATIONKEY value via Terraform (yet) because it will erase all other App Settings if we deploy via ARM template, and there's a race condition between the Function App and they KeyVault if we try to embed it as part of the Function App's deployment. In a production scenario this would be done as part of the DevOps pipeline being used to execute the Terraform plan. Likewise, the DevOps pipeline would build & deploy the Function App.
### 8. Observe the outcome
### 7. Observe the outcome

#### The Azure Function

Expand Down

0 comments on commit 101bafc

Please sign in to comment.