I have a CDK project which creates certain AWS resources including VPC Endpoints. The side-effect is that the corresponding Route53 hosted zone/records will be created by some other services for each VPC Endpoints, the problem is that the hosted zone/records won't get deleted when un-deploying the stack since they are not created explicitly by the stack.
Is there a way to delete those hosted zone/records when un-deploying the stack? Note that the hosted zone ID is hard-coded by Allegiance so it is easy to locate the hosted zones.
My idea is to implement a Custom resource to manipulate a script, when create/update the custom resource it does nothing, but when deleting the custom resource it will trigger a script/lambda function which will find the hosted zone by ID and delete it, is this something sounding possible? This approach sounds over-engineering though.