google_sql_ssl_certs resource
Use the google_sql_ssl_certs InSpec audit resource to to test a Google Cloud SslCerts resource.
Examples
describe google_sql_ssl_certs(project: 'chef-gcp-inspec', instance: 'test-pg') do
it { should exist }
its('instances') { should include 'test-pg' }
its('common_names') { should include 'C=US,O=Google\, Inc,CN=Google Cloud SQL Server CA,dnQualifier=68c79386-b63e-4998-8254-ba59729cdf78' }
its('sha1_fingerprints') { should include '80c5c611c0a591db967c7dda3467e23127288fed' }
end
describe google_sql_ssl_certs(project: 'chef-gcp-inspec', instance: 'nonexistent') do
it { should_not exist }
end
Properties
Properties that can be accessed from the google_sql_ssl_certs resource:
See google_sql_ssl_cert for more detailed information.
certs: an array ofgoogle_sql_ssl_certcertcert_serial_numbers: an array ofgoogle_sql_ssl_certcert_serial_numbercommon_names: an array ofgoogle_sql_ssl_certcommon_namecreate_times: an array ofgoogle_sql_ssl_certcreate_timeexpiration_times: an array ofgoogle_sql_ssl_certexpiration_timeinstances: an array ofgoogle_sql_ssl_certinstancesha1_fingerprints: an array ofgoogle_sql_ssl_certsha1_fingerprint
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 Cloud SQL Admin API is enabled for the current project.