A google_compute_backend_services is used to test a Google BackendService resource


describe google_compute_backend_services(project: 'chef-gcp-inspec') do
  its('count') { should be >= 1 }
  its('names') { should include 'inspec-gcp-backend-service' }
  its('port_names') { should include 'http' }
  its('protocols') { should include 'HTTP' }
  its('timeout_secs') { should include '10' }


Properties that can be accessed from the google_compute_backend_services resource:

See for more detailed information * affinity_cookie_ttl_secs: an array of google_compute_backend_service affinitycookiettlsec * backends: an array of `googlecomputebackendservicebackends *cdnpolicies: an array ofgooglecomputebackendservicecdn_policy *connectiondrainings: an array ofgooglecomputebackendserviceconnection_draining *creationtimestamps: an array ofgooglecomputebackendservicecreation_timestamp *fingerprints: an array ofgooglecomputebackendservicefingerprint *descriptions: an array ofgooglecomputebackendservicedescription *enablecdns: an array ofgooglecomputebackendserviceenable_cdn *healthchecks: an array ofgooglecomputebackendservicehealth_checks *ids: an array ofgooglecomputebackendserviceid *iaps: an array ofgooglecomputebackendserviceiap *loadbalancingschemes: an array ofgooglecomputebackendservice` loadbalancingscheme * names: an array of `googlecomputebackendservicename *portnames: an array ofgooglecomputebackendserviceport_name *protocols: an array ofgooglecomputebackendserviceprotocol *securitypolicies: an array ofgooglecomputebackendservice` securitypolicy * session_affinities: an array of google_compute_backend_service sessionaffinity * `timeoutsecs: an array ofgooglecomputebackendservice` timeoutsec

Filter Criteria

This resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.

GCP Permissions

Ensure the Compute Engine API is enabled for the current project.