Forum Discussion
CodeFly
Nov 01, 2021Copper Contributor
How to assign an existing Network Interface to a Private Endpoint
When creating a Private Endpoint a Network Interface is automatically created. Instead, I want to manually create a Network Interface (which is possible) and then attach it to a PE. The reason is that I want control over the naming convention of all my assets. Is there any way to do this?
- Hi CodeFly,
Please try to look at bicep for deploying your resources. This gives you all the control you need.
This is general information about Bicep:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview
This is the bicep template for a Private Endpoint:
https://docs.microsoft.com/en-us/azure/templates/microsoft.network/privateendpoints?tabs=bicep
This is the bicep template for a Network interface:
https://docs.microsoft.com/en-us/azure/templates/microsoft.network/networkinterfaces?tabs=bicep
Hope this helps!
Niels
- Niels_KokBrass ContributorHi CodeFly,
Please try to look at bicep for deploying your resources. This gives you all the control you need.
This is general information about Bicep:
https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview
This is the bicep template for a Private Endpoint:
https://docs.microsoft.com/en-us/azure/templates/microsoft.network/privateendpoints?tabs=bicep
This is the bicep template for a Network interface:
https://docs.microsoft.com/en-us/azure/templates/microsoft.network/networkinterfaces?tabs=bicep
Hope this helps!
Niels- lukemurraynzLearn Expert+1 for Bicep, you could create the Network Interface using PowerShell or manually by using the Azure Portal - but learning Bicep, will allow you to start putting resources together and get your Infrastructure as Code foo on.
Once you have the basics covered - then you can create your own naming module for your business as well:
https://4bes.nl/2021/10/10/get-a-consistent-azure-naming-convention-with-bicep-modules/