Creating a global forwarding rule using Deployment Manager

366 views
Skip to first unread message

James Bursa

unread,
Jul 18, 2016, 1:45:52 PM7/18/16
to gce-dis...@googlegroups.com
I'm trying to add a global forwarding rule using Deployment Manager, but get an error that "region" must be specified. Has anyone found a workaround?

For example, I can create this rule using the gcloud command (real IP address replaced):

$ gcloud compute forwarding-rules create live --global --address 1.2.3.4 --ports 443 --target-https-proxy live-target-proxy

and it succeeds. Using describe then shows:

$ gcloud compute forwarding-rules describe live --global
IPAddress: 1.2.3.4
IPProtocol: TCP
creationTimestamp: '2016-07-18T10:22:31.969-07:00'
description: ''
id: '725036370...'
kind: compute#forwardingRule
name: live
portRange: 443-443
selfLink: https://www.googleapis.com/compute/v1/projects/.../global/forwardingRules/live
target: https://www.googleapis.com/compute/v1/projects/.../global/targetHttpsProxies/live-target-proxy

When using Deployment Manager, I entered this into the YAML file as:

- name: live
type: compute.v1.forwardingRule
properties:
IPProtocol: TCP
IPAddress: 1.2.3.4
portRange: 443-443
target: global/targetHttpsProxies/live-target-proxy

but updating the deployment fails:

gcloud deployment-manager deployments update deployment-main \
--preview --config deployment-main.yaml \
--create-policy CREATE_OR_ACQUIRE --delete-policy ABANDON
Waiting for update operation-1468863312830-537ec63fc1e31-cbfb2c59-4dde4e6c...failed.
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation operation-1468863312830-537ec63fc1e31-cbfb2c59-4dde4e6c: <ErrorValue
errors: [<ErrorsValueListEntry
code: u'CONDITION_NOT_MET'
message: u'"": domain: validation; keyword: properties; message:
required property(ies) not found; missing: ["region"]; required: ["region"]'>]>

I tried adding "region: global" but that isn't accepted.

James

Faizan (Google Cloud Support)

unread,
Jul 19, 2016, 4:11:33 PM7/19/16
to gce-discussion
Hello James,

I was not able to reproduce this issue. My deployment was successful with the config that you have provided.

In order to further troubleshot the issue, can you provide me your gcloud version ?

Faizan

James Bursa

unread,
Jul 19, 2016, 5:38:50 PM7/19/16
to gce-discussion
Hi Faizan,

I just updated to 117 but I'm still getting the same error. Details below.

James


$ gcloud --version
Google Cloud SDK 117.0.0

alpha 2016.07.07
beta 2016.07.07
bq 2.0.24
bq-nix 2.0.24
core 2016.07.07
core-nix 2016.07.07
gcloud
gsutil 4.19
gsutil-nix 4.19
kubectl
kubectl-linux-x86_64 1.2.4

$ gcloud deployment-manager deployments update deployment-main \

       --preview --config deployment-main.yaml \
       --create-policy CREATE_OR_ACQUIRE --delete-policy ABANDON
Waiting for update operation-1468964140141-53803ddc2c9c9-47a49916-4c0b2247...failed.
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation operation-1468964140141-53803ddc2c9c9-47a49916-4c0b2247: <ErrorValue

Faizan (Google Cloud Support)

unread,
Jul 20, 2016, 1:32:53 PM7/20/16
to gce-dis...@googlegroups.com
Hello James,

In order to resolve your issue, you can use the type as 'compute.v1.globalForwardingRule' for global forwarding rule as shown below:

resources:
- name: live 
  type: compute.v1.globalForwardingRule
  properties:
    IPProtocol: TCP
    portRange: 443
    target: global/targetHttpsProxies/live-target-proxy

You can refer to this link [1] for more information.

I hope that helps.

Faizan

James Bursa

unread,
Jul 28, 2016, 10:43:56 AM7/28/16
to gce-dis...@googlegroups.com
Thank you Faizan, it worked for me when using
compute.v1.globalForwardingRule instead of compute.v1.forwardingRule.

My assumption had been that:

kind: compute#forwardingRule

in the describe output meant that

type: compute.v1.forwardingRule

was needed in the deployment YAML.

James

Reply all
Reply to author
Forward
0 new messages