Delete correct Private DNS Zone record when deleting Private Endpoint
1 Private DNS Zone for Storage (linked to above VNet)
1 Storage Account
2 Private Endpoints (PE1 and PE2)
When deploying a Private Endpoint (PE1) for the storage account to the VNet, an A record is automatically added to the Private DNS Zone as expected.
When deploying a second Private Endpoint (PE2) for the same storage account to the same VNet, the previous A record with PE1's IP is overwritten with PE2's IP.
When deleting PE1, the A record (pointing to PE2 IP) is deleted
It would be great if there was a platform check when deleting Private Endpoints to ensure that DNS records will only be deleted if they match the deleted PE IP. Using the above scenario: When deleting PE1, the platform will check if there are records containing PE1 IP, since there is no record with PE1 IP no records will be deleted. The DNS record pointing to PE2 will persist.
Stein, Peter commented
Thanks Zach for getting this concisely iterated and submitted on our behalf!