Description
openedon Nov 1, 2024
Describe the bug
The code seems a bit complicated, but from what I can figure out AzOps deletion of custom resources seems to require following the AzOps naming convention for resolving the diffdeletedfiles to "statepath", that is resourceprovider+resource+childpath
i.e microsoft.authoriation_policydefinitions_somename.json/bicep.
I believe this is a product of how AzOpsScopes are built, see the below link for more information.
AzOps/src/internal/classes/AzOpsScope.ps1
Line 543 in c3ad03a
It would be great if this is more obvious in the wiki, perhaps some statement that azops requires the naming convention to be followed, and also a separate wiki page detailing exactly how azops builds the file names and a disclaimers that they need to be followed if resource deletion is wanted.
https://github.com/azure/azops/wiki/ResourceDeletion
A good bonus to this might be that the validate.yaml could screen for naming convention resource type prefix.
Steps to reproduce
- Create a file with naming that does not follow azops standards
- deploy file
- delete file
- nothing gets deleted