I am reviewing firewall rules and would like to identify the specific resources for which that firewall rule applies (i.e. the resources with the specified network tag). I know this can be seen in the console by clicking on the specific firewall rule, however, I would like to do this much faster with a gcloud command.
I've reviewed the documentation here but I can't seem to work out the command for how to simply list the resources with a specific network tags.
The gcloud tools make this search available via the --filter command line flag. The command below will list all compute instances in GCE with the specific network tag. DOCS: https://cloud.google.com/sdk/gcloud/reference/topic/filters
gcloud compute instances list --filter="tags.items=<insert network tag>"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With