Dataflow disable public ip

93 views Asked by At

I´m using dataflow and I want to disable the public IP, I have tried the following commands:

--no_use_public_ips


 --disable-public-ips 

I have also provided a subnetwork using the argument:

 --subnetwork regions/$REGION/subnetworks/default \

But nothing worked

1

There are 1 answers

0
Poala Astrid On BEST ANSWER

It seems like you are working with a dataflow service and trying to disable public IPs. However, the options you mentioned --no_use_public_ips and --disable-public-ips don't seem to be standard options for Dataflow.

To disable public IPs for a Dataflow job, you typically need to ensure that your Dataflow workers are running in a private network. When you specify a subnetwork using the --subnetwork flag, it should be a private subnetwork that doesn't have external IP addresses.

You might want to change your subnetwork into this complete string: --subnetwork https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION_NAME/subnetworks/SUBNETWORK_NAME

Posting this answer as a Community Wiki for the benefit of the community that might encounter this use case in the future, since this question garnered a long thread.

Please feel free to edit this answer for additional information and if there are other possible workarounds/direct solutions for this use case.