The storageMailNotifier
is a .NET application designed to automatically send an email notification whenever a new file is uploaded to Azure Blob Storage.
- Unit Testing: Use NSubstitute
- Validation: Use FluentValidation for input and notification validation
- Email Sending: Use SMTP to send emails
- Infrastructure as Code: Use Terraform to create and manage the Azure Function infrastructure
- Azure Functions: Learn how to create and deploy an Azure Function
- Azure Resources: Explore advanced Azure resources and their integration
- SMTP: Gain a deeper understanding of SMTP and its configurations
- Notification Libraries: Learn about FluentValidation for handling notifications
- Mock Libraries: Gain experience with NSubstitute for unit testing
- Infrastructure Automation: Learn how to use Terraform with Azure
Before running the Blob.Storage.Listener
project, ensure you have the following prerequisites installed:
- .NET 6
- An Azure Blob Storage account
Follow these steps to get the project up and running:
-
Clone the repository:
git clone https://github.com/Raffael-Eloi/storageMailNotifier.git cd storageMailNotifier
-
Setup Azure Blob Storage:
- Create an Azure Blob Storage account if you don't already have one.
- Note down the connection string for the storage account.
-
Configure the application:
- Update the
appsettings.json
or environment variables with your Azure Blob Storage connection string and SMTP settings.
- Update the
-
Deploy using Terraform:
- Navigate to the storageMailNotifierFunction repository for Terraform configuration.
- Follow the instructions to provision the required Azure resources.
-
Run the application:
cd src/Blob.Storage.Listner dotnet run
-
Running locally:
- Add a file named
local.settings.json
with the following content
{ "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "YOUR_STORAGE_ACCOUNT_CONTAINER_CONNECTION_STRING", "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", "WEBSITE_RUN_FROM_PACKAGE": true } }
- Add a file named
For provisioning the necessary infrastructure, refer to the storageMailNotifierFunction repository.
This project is licensed under the MIT License. See the LICENSE file for details.