[
https://issues.apache.org/jira/browse/JCLOUDS-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16459703#comment-16459703
]
Ignasi Barrera commented on JCLOUDS-1415:
-----------------------------------------
Thanks for reporting. it definitely looks like a bug in the code as we haven't
used the shared VPCs before. I'd say the right solution would be to just use
the provided network ID (the full URI), as using the {{networkProjectId}}
approach does not seem to fit well when you are mixing networks from different
projects.
> Does Jclouds support shared VPC
> -------------------------------
>
> Key: JCLOUDS-1415
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1415
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-compute, jclouds-labs-google
> Affects Versions: 2.1.0
> Environment: 4.15.15-1-ARCH x86_64
> Reporter: Mathieu Tortuyaux
> Priority: Minor
> Labels: google-compute-engine
>
> Hi !
> I am using Jclouds in order to create instances on multi-cloud providers.
> However, with Google Compute Engine I have a shared vpc on a project:
> _vpc_project_ and my project is running under _current_project_.
> When I add to the template this network:
>
> {noformat}
> templateBuilder.locationId("northamerica-northeast1-c");
> templateOptions.networks("projects/vpc_project/regions/northamerica-northeast1/subnetworks/net-vpc-project");
> {noformat}
> I got the following error:
> {noformat}
> 2018-04-30 11:00:57,989 WARN [jclouds.compute] [main] >>
> subnet(net-vpc-project) was not found in region(northamerica-northeast1).
> Trying to find a matching legacy network...
> {noformat}
> And in wired logs:
> {noformat}
> The resource
> 'projects/current_project/regions/northamerica-northeast1/subnetworks/net-vpc-project
> was not found
> {noformat}
> So Jclouds is able to know that I'm trying to add a subnetwork to my
> template, but he's trying to load it from _current_project_ and not from
> _vpc_project_.
> I am running with JClouds 2.1.0 and my Google Service Account is able to use
> network from _vpc_project_.
> In my opinon, we should add an option like:
> {noformat}
> template.networkProjectId("vpc_project")
> {noformat}
> Or parsing the URI given to networks.
> Or maybe I am totally wrong. :)
> Thanks !
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)