Use this data source to get information about a database in a Cloud SQL instance.
data "google_sql_database" "qa" {
name = "test-sql-database"
instance = google_sql_database_instance.main.name
}
The following arguments are supported:
name
- (required) The name of the database.
instance
- (required) The name of the Cloud SQL database instance in which the database belongs.
project
- (optional) The ID of the project in which the instance belongs.
See google_sql_database resource for details of all the available attributes.