This project contains an Azure Function that processes Azure Event Grid events and sends data to an HTTP endpoint then onto Azure Event Hub. Note: This is a GitHub Copilot Edits port from my C# repo, so I've not yet updated this README suitable for Python...
- Navigate to your Azure Function App in the Azure Portal.
- Go to the "Environment variables" section under "Settings".
- Click on "+ Add".
- Enter
SimulatorUrlPrefixas the name and http://<container-apps-name-for-httpserver>/ as the value. Click "Apply" - Enter
SimulationIdalong with the uuid of the simulation. Click "Apply". - Enter
SimulationSchemaalong with the JSON for the schema. Click "Apply". - Click "Apply" to apply all the changes.
For more detailed instructions, you can refer to the official documentation: Configure app settings for Azure Functions.
For local development, you can set environment variables in the local.settings.json file. Here is an example of how to set the SimulatorUrlPrefix environment variable:
- Open the
local.settings.jsonfile. - Add the
SimulatorUrlPrefixenvironment variable under theValuessection. - Enter the URL of the Azure Container Apps app.
- Save the file.
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"SimulatorUrlPrefix": "http://\<container-apps-name-for-httpserver\>",
"SimulationId": "1234-5678-9012-3456",
"SimulationSchema": "{ 'key': 'value' }"
}
}