[
https://issues.apache.org/jira/browse/JCLOUDS-1121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erin Collins closed JCLOUDS-1121.
---------------------------------
Resolution: Cannot Reproduce
> Unable to specify non-default zone when creating GCE template
> -------------------------------------------------------------
>
> Key: JCLOUDS-1121
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1121
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-labs-google
> Affects Versions: 1.9.2
> Reporter: Erin Collins
>
> I'm having trouble when specifying a GCE zone to provision new instances.
> We have these paramaters set in our GCE project metadata in the google
> console:
> {noformat}
> google-compute-default-region: us-central1
> google-compute-default-zone: us-central1-a
> {noformat}
> (as described here:
> https://cloud.google.com/compute/docs/gcloud-compute/#default-properties)
> To provision an instance, we create a template like the following. However,
> when I specify 'us-central1-f' for the zone, the template defaults back to
> 'us-central1-a'.
> {code}
> def context = ContextBuilder.newBuilder(new
> GoogleComputeEngineProviderMetadata())
> .credentials(identity, credential)
> .overrides(overrides)
> .modules(getModules())
> .buildView(ComputeServiceContext.class)
> ComputeService computeSvc = ctx().getComputeService()
> TemplateBuilder templateBuilder = computeSvc.templateBuilder()
> templateBuilder.locationId('us-central1-f') <- When this returns, the zone in
> the templateBuilder object actually points to us-central1-a
> {code}
> So, I'm assuming jclouds is picking up the default zone from the metadata?
> As a workaround for now, I believe I can just change our default zone in the
> metadata and move our new provisioning over to us-central1-f, but that won't
> allow us to give users the option of provisioning in a specific zone other
> than the default one.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)