I have a Python script that runs an nmap command simply using subprocess. I need to run this every time an ip is added to a BQ dataset. My initial thought was to use google cloud functions to run this for the new ip, but realized that google cloud function didn't have the ability to use nmap as far as i'm aware. My next thought was to set up some VM where i could create a venv with nmap included, but doubt this is ideal. I know there are several google service that have networking, such as cloud DNS and their cloud security scanner, but as far as i can tell they don't help with this.
put simply is there a better way to trigger and run a python nmap command script every time a new IP is added to a dataset, other than creating a vm?
All ideas welcome, Thanks for taking the time !