I am seeking some clarity on the best way to integrate Key Vault in ARM deployments within Azure DevOps.
For example, deploying an App Service and creating a Managed Service Identity so that it can get secrets from the key vault for a pre-existing Database.
1) In the Azure portal, I have manually created a new Service Principal for the App service with "Get" and "List" permissions in the access policy.
2) In My DevOps Project under the project settings I have created a service connection.
3) I have created a Variable group in DevOps with relevant Key Vault Secrets.
4) In my App Service ARM template i have referenced the Service Identity with reference to the Variable Parameters.
Is this the correct way to integrate Key Vault with a DevOps Deployment?
Whenever I need to deploy a new service to the environment (say now I want to deploy an API), do I need to manually create another Managed Identity in Azure for the Key Vault Access or is there a way to create it as part of the initial deployment of the API service?
Thank you in advance for your assistance.