>        Network network = getOrCreateNetwork(templateOptions, 
> sharedResourceName);
> -      getOrCreateFirewalls(templateOptions, network, 
> firewallTagNamingConvention.get(group));
> +      // add firewalls *only* if the template options don't contain explicit 
> network
> +      if (templateOptions.network() == null) {

ok @nacx thanks for your feedback, I'll try to fix the issue in a different 
way, then.

Let me try to explain a little better the problem: `networks` and `firewalls` 
in GCE are limited resources. Sometimes in order to save time and network 
resources, you may want to re-use an existing network (i.e. passing 
TemplateOptions.network()) 
this is what happens with jclouds/openstack-nova for example, where if you 
specify an existing securityGroup, jclouds doesn't recreate it *and* doesn't 
even try to add the rules for the `inboundPorts` (see 
[here](https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/strategy/ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java#L140-L140))
 

I was trying to re-use the same pattern here, but you just said that this is 
not an option as it breaks portability. 
As soon as I have a patch for gce we should revisit also openstack-nova, imho.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/172/files/a083442f462a4b5dcc0c9dabfcca8a181b8e2889#r73107071

Reply via email to