Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Commit 26f6944

Browse files
committed
Updating README.md with run instructions & screenshots
1 parent abc752a commit 26f6944

File tree

5 files changed

+26
-6
lines changed

5 files changed

+26
-6
lines changed

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ products:
1818
This sample will show you how to create Terraform scripts that create an Azure Function and Subscribe it to Event Grid Storage events.
1919
This is especially interesting as, for Event Grid Subscriptions, the target endpoint must answer EG's "[Subscription Validation Event](https://docs.microsoft.com/en-us/azure/event-grid/security-authentication#validation-details)" which it cannot do until it is deployed. So this method - affectionally coined a "Terraform Sandwich" - shows how to do just that.
2020

21-
## Running the sample locally
21+
## Deploying locally
2222
1. Open the repo in its VS Code Dev Container (this ensures you have all the right versions of the necessary tooling)
2323
1. run `az login` and `az account set --subscription <target subscription id>` to connect to your Azure Subscription
2424
1. `cd infrastructure/terraform`
@@ -34,8 +34,28 @@ This is especially interesting as, for Event Grid Subscriptions, the target endp
3434
- Deploys the function app out to Azure so it's ready to answer the subscription wire-up that Terraform will do next
3535
- Tells terraform to apply **everything**, which issues the necessary changes to Azure to add the event grid subscription to an 'inbox' storage account
3636

37-
## Running the sample via Azure DevOps
37+
## Deploying via Azure DevOps
3838
By importing the [azure-piplines.yaml](./azure-pipelines.yaml) file in to an Azure DevOps pipeline, you'll get the same process as the above local execution.
39-
> Note: Be sure to change [the `PREFIX` variable](./azure-pipelines.yml#L14) to something unique to you to avoid naming collisions on storage & function apps
39+
> Note: Be sure to uncomment change [the `PREFIX` variable](./azure-pipelines.yml#L10) to something unique to you to avoid naming collisions on storage & function apps
4040
41-
<img src="img/azdo_run.png" alt="Azure DevOps successful run" width="200"/>
41+
<img src="img/azdo_run.png" alt="Azure DevOps successful run" width="200"/>
42+
43+
## Running the sample
44+
This sample has an Azure Function that subscribes to Blob Storage Events and then simply passes the event on to a custom Event Grid Topic. The receiving and sending of events is accomplished via the Event Grid Binding for Azure Functions.
45+
46+
To exercise the sample:
47+
1. Open the 'inbox' storage account created by the deployment
48+
1. Create a new container
49+
1. Upload a file in to the container
50+
51+
Next, go to the Azure Portal, and the Storage Account created by the deployment. Click the 'Events' area and you will see one or more events have come through:
52+
53+
<img src="img/azstorevents.png" alt="Azure Portal Storage Events area" width="600"/>
54+
55+
Then go to the custom topic created by deployment, and you'll see that one or more events have been posted to it:
56+
57+
<img src="img/azcustomtopicevents.png" alt="Azure Portal Custom Topic Events area" width="600"/>
58+
59+
Finally, if you wish to see the output from the Function, go to the Application Insights resource created by deployment and look through the logged TRACE events:
60+
61+
<img src="img/azloggedevents.png" alt="Azure Portal Custom Topic Events area" width="600"/>

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ pool:
66

77
variables:
88
LOCATION: westus
9-
# Change this to something more unique before running!
10-
PREFIX: azuresample
9+
# Uncomment & change this to something more unique before running
10+
# PREFIX: azuresample
1111

1212
jobs:
1313
- job: SetupAzureTFBackend

img/azcustomtopicevents.png

177 KB
Loading

img/azloggedevents.png

275 KB
Loading

img/azstorevents.png

191 KB
Loading

0 commit comments

Comments
 (0)