>        if (subnetId != null) {
> -         
> AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
> +          if(associatePublicIpAddress){
> +              
> AWSRunInstancesOptions.class.cast(instanceOptions).associatePublicIpAddressAndSubnetId(subnetId);
> +              if (awsTemplateOptions.getGroupIds().size() > 0)
> +                 
> awsInstanceOptions.withSecurityGroupIdsForNetworkInterface(awsTemplateOptions.getGroupIds());
> +          }else{
> +              
> AWSRunInstancesOptions.class.cast(instanceOptions).withSubnetId(subnetId);
> +              if (awsTemplateOptions.getGroupIds().size() > 0)
> +                 
> awsInstanceOptions.withSecurityGroupIds(awsTemplateOptions.getGroupIds());
> +          }

[minor] Style: Add the spaces in the conditionals.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/333/files#r11671191

Reply via email to