I'm trying to move CDN endpoint resources from one subscription to another subscription but I'm getting the following error. I have the CDN profile and endpoint in same RG.
Identifier '/subscriptions/xxx/resourceGroups/internal/providers/Microsoft.Cdn/profiles/internal-cdn/endpoints/internal-cdn-endpoint' is not a top level resource.
Can you please provide some suggestions to move the resource?
Like the error say the CDNEndpoint it's below a CDN Profile, you can't move an CND EndPoint directly, you have to move the entire CDN Profile to the Target Resource Group.
I make a quickly test and I was able to move the CDN profile with any problem, both with the move button of the portal and with the following powershell commands:
$SourceAID = (Get-AzureRmResource –ResourceGroupName "ResouceGroupFROM" -ResourceName "CDNPROFILE-NAME").ResourceID
Move-AzureRmResource -DestinationResourceGroupName "ResouceGroupTARGET" -ResourceId $SourceAID