A google_compute_ssl_policies is used to test a Google SslPolicy resource


describe google_compute_ssl_policies(project: 'chef-gcp-inspec') do
  it { should exist }
  its('names') { should include 'inspec-gcp-ssl-policy' }
  its('profiles') { should include 'CUSTOM' }
  its('count') { should eq 1 }

google_compute_ssl_policies(project: 'chef-gcp-inspec').names.each do |policy_name|
  describe google_compute_ssl_policy(project: 'chef-gcp-inspec', name: policy_name) do
    its('min_tls_version') { should eq 'TLS_1_2' }


Properties that can be accessed from the google_compute_ssl_policies resource:

See for more detailed information * creation_timestamps: an array of google_compute_ssl_policy creationtimestamp * descriptions: an array of `googlecomputesslpolicydescription *ids: an array ofgooglecomputesslpolicyid *names: an array ofgooglecomputesslpolicyname *profiles: an array ofgooglecomputesslpolicyprofile *mintlsversions: an array ofgooglecomputesslpolicymin_tls_version *enabledfeatures: an array ofgooglecomputesslpolicyenabled_features *customfeatures: an array ofgooglecomputesslpolicycustom_features *fingerprints: an array ofgooglecomputesslpolicyfingerprint *warnings: an array ofgooglecomputesslpolicy` warnings

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.