Problem description
Cloning an Environment in CloudRanger fails with Error "The vpc 'vpc-aaabbb111222' has dependencies and cannot be deleted. Resource handler returned message: "Request limit exceeded"
Cause
The VPC selected in the CloudRanger console has nested Security Groups. Some Security Groups are referenced in the Inbound or Outbound rules of other Security Groups. Druva CloudRanger does not support nested Security Groups.
Traceback
In this example, we will consider that the Security Group selected in the Source Environment is called 'SEC-GROUPA' with Security Group ID 'sg-aaaaaaaa'
In the Inbound Rules of the Security Group 'SEC-GROUPA' there is a Rule referencing another Security Group that does not exist in the Target Region, or that is not selected in the Source Environment in CloudRanger.
The other Security Group that is referenced in Security Group 'SEC-GROUPA' is called 'SEC-GROUPB' and has the Security Group ID 'sg-bbbbbbbb'
Cloning an Environment in CloudRanger tries to create a Security Group on the Target Region that is similar to the one on the Source Region. This includes the same Inbound Rules.
Because the Security Group 'SEC-GROUPB' with Security Group ID 'sg-bbbbbbbb' does not exist in the Target Region, or has not yet been Cloned by CloudRanger, the Clone Job fails with the Error below:
The vpc 'vpc-aaabbb111222' has dependencies and cannot be deleted. Resource handler returned message: "Request limit exceeded"
Error:
"step": "aws/monitor/cloudformationstack", "status_message": "One or more errors occurred: The security group 'sg-abcd1234' does not exist",
Resolution
As a workaround and to Clone your different resources successfully you can create different Environments with one VPC per Environment.
You can clone the Environments in the correct order so that when a certain Security Group is cloned, all the Security Groups that are referenced in it already exist in the Target Region.