Azure Function with custom handler invoking a binary compiled from code written in Rust with the Axum framework. This axum project is built and deployed automatically on repository pushes with GitHub Actions Workflows. Azure resources are provisioned with Terraform.
- x86-64
- Linux/Unix
- Rust
The shell script 'up' allocates Azure resources with Terraform.
The shell script 'down' deallocates Azure resources.
- Run the 'up' script to provision Azure resources.
- Open your browser and navigate to the Azure Portal.
- Navigate to 'Microsoft Entra ID' using the search bar.
- Click on 'Add' and choose 'App registration'.
- Set name to 'hvalfangst-axum-function', account option to 'Single tenant', and click 'Register'.
- Go to the overview of the newly created app registration 'hvalfangst-axum-function'.
- Copy values associated with Application (client) ID and Directory (tenant) ID for future use.
- Navigate to 'Certificates & secrets' under 'Manage'.
- Click the button titled 'New client secret' under 'Client secrets'.
- Pick a fitting description and keep default expiry. Click on the 'Add' button to finish.
- Copy the associated value with the newly created secret.
- Navigate to your subscription, which holds your provisioned resource group.
- Click on 'Add' under 'Access control (IAM)' and pick 'role assignment'.
- Choose the role 'Contributor' under 'Privileged administrator roles'.
- Navigate to the 'Members' section and click 'Select members'.
- Search for the app registration 'hvalfangst-axum-function' and assign the role.
- Open the 'Settings' tab of your GitHub repository.
- Click on 'Actions' under 'Security' -> 'Secrets and variables'.
- Create the following repository secrets:
- AZURE_SP_APP_ID : Value copied in step #3
- AZURE_SP_PASSWORD: Value copied in step #3
- AZURE_TENANT_ID : Value copied in step #4
The GitHub Actions workflow 'cicd' will automatically build our axum binary and deploy the azure function customer handler on repository pushes.