Hello @Razzi29 ,
Welcome to Microsoft QnA.
You might not have received a response on this thread as there is no readily available solution for it. You will need to research a little and tweak solutions as per your requirement.
Please refer to the below blogs that can help you (and feel free to tweak them as per your need )->
Managing-arm-templates-with-csv-parameters
NSG-CSV-to-ARM
Once you have a rough template and you need help on specific areas, please reach back to us and we community members can take a look at it and try helping. Hope this helps you.
Please do not hesitate to reach back to us incase of any queries or questions. Thanks :)
------------------------
If you find the above information helpful, kindly "accept as answer" or "upvote" to increase the relevancy of this post.