This project is created to enable the uploading of file into Azure Blob Storage with the scanning capabilities. The Azure Function integrated with ClamAV and triggered when file is uploaded into the blob storage.
This project also using Azure Bicep - IaC to automate the provisioning of the Azure Services.
-
Clone the repository into your local environment.
-
Create Azure Resource Group under Azure Subscription.
az group create --name <resource-group-name> --location eastus
-
Go to the deploy folder.
-
Run the following Bicep command to provision the required services
az deployment group create --resource-group <resource-group-name> --template-file main.bicep
-
Verify that all the resources have been created. You will be able to see the following resrouces created.
- Storage Account
- Go to the stroage account starting with prefix "betablob" and click on Containers. Verify the 3 containers have been created.
- Azure Function
- App Service Plan
- Azure Container Instances
- Application Insights
- Storage Account
-
Copy the connection string from Azure Storage Account and modify in Azure Function
- Go to the Storage Account with prefix "betablob" and select Access Keys.
- Go to Azure Function Configuration and replace the value of "blobmonitorconnstring"
-
Go to src folder and deploy Azure Function to the Azure Function created on step 4.
- Go to Azure Storage Account and explore UploadBlob folder.
- Upload any file into the folder and Azure Function will be triggered for scanning and move to the corresponding folder.
-
How to Install Azure CLI
-
Learn how to create Module in Azure Bicep