This software periodically deletes unlocked Azure Resources. In our case, it's the first saturday of the month.
This is specified with app settings. See deployment/Prepare-Environment.ps1
and deployment/azuredeploy.bicep
for configuration example.
To opt out from this, lock your resouce group. for more information, see Opt Out
These commands are assumed to be executed from the same directory this file exists.
These commands can also be executed from project directories, but
the directory/project needs to be removed from the command. See dotnet
documentation from more information.
This project requires dotnet core, see image used in Jenkinsfile for specific requirements.
dotnet build .\src\
dotnet test .\src\
For acceptance testing, see Acceptance Testing
For running this locally, see Comamnd line usage
Project Pinja.AzureSubscriptionCleaner.AzureFunctions
can be deployed to Azure as Azure Function.
Create copy from developer-settings.example.json
as developer-settings.json
with your own values and execute deployment\Prepare-Environment.ps1
The function app also needs to be able to delete other resource groups. This can be done by giving
the function app Contributor
access to the subscription. This is not done as part of the CI progress.
For details, see deployment\Prepare-Environment.ps1