1

I am using the following to try and create an internal load balancer via Deployment Manager using the following code

- name:  {{ env["name"] }}-port389-healthcheck
type: compute.v1.healthChecks
properties:
    type: tcp
    tcpHealthCheck: {
    port: 389
    }

- name: {{ env["name"] }}-port389-backend-service
type: compute.beta.backendService
properties:
    healthChecks:
    - $(ref.{{ env["name"] }}-port389-healthcheck.selfLink)
    backends:
    - group: $(ref.{{ env['name'] }}-master-instance-groups-managed.instanceGroup)
    - group: $(ref.{{ env['name'] }}-slave-instance-groups-managed.instanceGroup)
    protocol: TCP
    region: {{ properties['region'] }}
    loadBalancingScheme: INTERNAL

- name: {{ env["name"] }}-port389-forwarding-rule
type: compute.beta.forwardingRule
properties:
    loadBalancingScheme: INTERNAL
    ports: 
    - 389
    network: default
    region: {{ properties["region"] }}
    backendService: $(ref.{{ env["name"] }}-port389-backend-service.selfLink)

It errrors when run with the following

Waiting for create operation-1478651694403-540d36cfdcdb9-cba25532-08697daf...failed.
ERROR: (gcloud.beta.deployment-manager.deployments.create) Error in Operation operation-1478651694403-540d36cfdcdb9-cba25532-08697daf:
errors:
- code: RESOURCE_ERROR
location: /deployments/forgerock/resources/forgerock-frontend-port389-backend-service-us-central1
message: 'Unexpected response from resource of type compute.beta.backendService:
    400 {"code":400,"errors":[{"domain":"global","message":"Invalid value for field
    ''resource.loadBalancingScheme'': ''INTERNAL''. Load balancing scheme must be
    external for a global backend service.","reason":"invalid"}],"message":"Invalid
    value for field ''resource.loadBalancingScheme'': ''INTERNAL''. Load balancing
    scheme must be external for a global backend service.","statusMessage":"Bad Request","requestPath":"https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/global/backendServices"}'

It would appear to be creating using the https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/global/backendServices instead of https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/backendServices

I know this is beta functionality, but trying to develop this solution using GDM instead of a mixture of gcloud commands and GDM

  • Were you able to get this to work? It would seem that [GDM](https://cloud.google.com/deployment-manager/configuration/create-configuration-file#supported_resource_types_and_properties) should be able to handle it. Can you provide details on which part worked on GDM and which part you used gcloud? – Carlos Dec 05 '16 at 21:48

1 Answers1

2

Please see https://stackoverflow.com/questions/40498889/cloud-deployment-manager-internal-load-balancer-create-issue for how to solve this.

In essence it says that we need to use compute.v1.regionBackendService