I am using Terraform templates to provision a Google Cloud Dataproc cluster. After that, I'm creating firewall rules to restrict ingress traffic to those compute engine instances.
I'm looking for a way to automatically create firewall rules along with the dataproc cluster. There does not seem to be a straightforward way as I have to mention the IPs in the firewall rules, which can be obtained only by looking at the created cluster.
Another way I was thinking is to create a VPC with security and create the dataproc cluster within that VPC.
Can anyone provide any expert advise on this?