Symptoms:
Unable to redeploy or upgrade an edge with the error: resgroup-#### could not be found
This happens when the resource group is deleted and recreated.
The database of the NSX manager contains old resource group ID instead of the new one.
To resolve the issue, follow the instructions:
Network & security -> Edge gateway -> Edge name -> Setting -> Configuration
This will trigger a redeploy of the edge gateway.
Note: If it is necessary to put back to the resource group do the step again and put back in the previous resource group this way the NSX manager and vCenter will give the correct resource group ID.