title: GCP Healthcheck not found External HTTP LoadBalancer yaml
body: <p>I'm a bit new at google cloud deployment but I'm currently trying to set up a external http loadbalancer with yaml in google cloud deployment manager.
  The loadbalancer uses a healthcheck but when I try to redirect to where my healthcheck is it gives an error that it can't find it.</p>
  <p>I tried to create the healthcheck manually in the console but it still says it can't find it.</p>
  <p>I've gone over the documentation here <a href="https://cloud.google.com/compute/docs/reference/rest/v1/backendServices" rel="nofollow noreferrer">https://cloud.google.com/compute/docs/reference/rest/v1/backendServices</a> and here <a href="https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks" rel="nofollow noreferrer">https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks</a> and it looks like it should be working but it don't.</p>
  <p>I have also searched on google and stack overflow for an answer but haven't found anything. I've also tried to use selflink to link to the healthcheck. But that won't work either. I feel like im missing something here.</p>
  <pre><code>- name: healthcheckpls
    type: compute.v1.httpHealthCheck
    properties:
      port: 80
      requestPath: /
  
  - name: bes
    type: compute.v1.backendService
    properties:
      port: 80
      portName: http
      protocol: HTTP
      backends:
      - name: bes
        balancingMode: UTILIZATION
        capacityScaler: 1.0
        group: zones/us-central1-f/instanceGroups/instancegroup-1
      maxUtilization: 0.8
      connectionDraining:
        drainingTimeoutSec: 300
      healthChecks: 
      - global/httpHealthChecks/healthcheckpls
  - name: apache-url-map
    type: compute.v1.urlMap
    properties:
      defaultService: $(ref.bes.selfLink)
  - name: apache-http-proxy
    type: compute.v1.targetHttpProxy
    properties:
      urlMap: $(ref.apache-url-map.selfLink)
  - name: apache-ipaddress
    type: compute.v1.globalAddress
  - name: apache-http-forwardingrule
    type: compute.v1.globalForwardingRule
    properties:
      target: $(ref.apache-http-proxy.selfLink)
      IPAddress: $(ref.apache-ipaddress.address)
      IPProtocol: TCP
      portRange: 80-80
  </code></pre>
  <p>Here is the Error I get from the deployment manager.</p>
  <pre><code>ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation [operation-1606653109305-5b53e13db7fbd-7084e34a-f0444d0f]: errors:
  - code: RESOURCE_ERROR
    location: /deployments/lampdeployment/resources/bes
    message: &quot;{\&quot;ResourceType\&quot;:\&quot;compute.v1.backendService\&quot;,\&quot;ResourceErrorCode\&quot;\
      :\&quot;404\&quot;,\&quot;ResourceErrorMessage\&quot;:{\&quot;code\&quot;:404,\&quot;errors\&quot;:[{\&quot;domain\&quot;:\&quot;global\&quot;\
      ,\&quot;message\&quot;:\&quot;The resource 'projects/cloudautomation-296812/global/httpHealthChecks/healthcheckpls'\
      \ was not found\&quot;,\&quot;reason\&quot;:\&quot;notFound\&quot;}],\&quot;message\&quot;:\&quot;The resource 'projects/cloudautomation-296812/global/httpHealthChecks/healthcheckpls'\
      \ was not found\&quot;,\&quot;statusMessage\&quot;:\&quot;Not Found\&quot;,\&quot;requestPath\&quot;:\&quot;https://compute.googleapis.com/compute/v1/projects/cloudautomation-296812/global/backendServices\&quot;\
      ,\&quot;httpMethod\&quot;:\&quot;POST\&quot;}}&quot;
  </code></pre>
  <p>Am I missing something? Why isn't this working?</p>
  <p>I'm very new at this so if there is something fundemental im missing I would also like to know :D</p>
  <p>Thanks for the help guys! I really appreciate it.</p>