Skip to main content

google_sql_databases resource

Use the google_sql_databases InSpec audit resource to to test a Google Cloud Database resource.

Examples

describe google_sql_databases(project: 'chef-gcp-inspec', instance: 'my-database') do
  it { should exist }
  its('names') { should include 'my-db' }
  its('instances') { should include 'my-database' }
end

Properties

Properties that can be accessed from the google_sql_databases resource:

See google_sql_database for more detailed information.

  • charsets: an array of google_sql_database charset
  • collations: an array of google_sql_database collation
  • names: an array of google_sql_database name
  • instances: an array of google_sql_database instance

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.

Thank you for your feedback!

×