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 ofgoogle_sql_database
charsetcollations
: an array ofgoogle_sql_database
collationnames
: an array ofgoogle_sql_database
nameinstances
: an array ofgoogle_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.