ARM Template :-
You can automate deployments and use the practice of infrastructure as code. In code, you define the infrastructure that needs to be deployed.
ARM Lock:-
You can lock an Azure subscription, resource group, or resource to protect them from accidental user deletions and modifications. The lock overrides any user permissions.