title | platform |
---|---|
About the google_sql_database resource |
gcp |
A google_sql_database
is used to test a Google Database resource
describe google_sql_database(project: 'chef-gcp-inspec', instance: 'my-database', gcp_db_name: 'my-db') do
it { should exist }
its('name') { should eq 'my-db' }
its('instance') { should eq 'my-database' }
end
Properties that can be accessed from the google_sql_database
resource:
-
charset
: The charset value. See MySQL's Supported Character Sets and Collations and Postgres' Character Set Support for more details and supported values. Postgres databases only support a value ofUTF8
at creation time. -
collation
: The collation value. See MySQL's Supported Character Sets and Collations and Postgres' Collation Support for more details and supported values. Postgres databases only support a value ofen_US.UTF8
at creation time. -
name
: The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. -
instance
: The name of the Cloud SQL instance. This does not include the project ID.
Ensure the Cloud SQL Admin API is enabled for the current project.