I use Oracle Compute instances and Oracle Autonomous Database (ATP).
I want to allow compute instances to access only Autonomous Databases and I don't want to allow compute instances access to other public network.
I tried to set up an egress rule by security lists, but Autonomous Database's ip address is subject to change. I think this approach is inappropriate.
My license is Oracle Cloud Infrastructure Free Tier. So, I can't use Private Endpoint Access to Autonomous Database.
Do you have a solution to allow compute instances to access only Autonomous Databases?
You can use a Service Gateway on your VCN and remove NAT/IGW. This way the VCN will only be connected to OCI services, which includes Autonomous.
https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/access-service-gateway.html#GUID-76D412D4-03F4-49BA-B70C-DEA70B11AC34