google_sql_flags resource
Use the google_sql_flags InSpec audit resource to to test a Google Cloud Flag resource.
Examples
describe google_sql_flags do
its('names') { should include , 'audit_log' }
its('types') { should include , 'STRING' }
its('applies_tos.first') { should include , 'MYSQL_5_6' }
its('allowed_string_values.first') { should include , 'true' }
its('requires_restarts') { should include , 'true' }
end
Properties
Properties that can be accessed from the google_sql_flags resource:
See google_sql_flag for more detailed information.
allowed_string_values: an array ofgoogle_sql_flagallowed_string_valuesapplies_tos: an array ofgoogle_sql_flagapplies_tomax_values: an array ofgoogle_sql_flagmax_valuemin_values: an array ofgoogle_sql_flagmin_valuenames: an array ofgoogle_sql_flagnamerequires_restarts: an array ofgoogle_sql_flagrequires_restarttypes: an array ofgoogle_sql_flagtype
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.