» google_sql_source_representation_instance

A source representation instance is a Cloud SQL instance that represents the source database server to the Cloud SQL replica. It is visible in the Cloud Console and appears the same as a regular Cloud SQL instance, but it contains no data, requires no configuration or maintenance, and does not affect billing. You cannot update the source representation instance.

» Example Usage - Sql Source Representation Instance Basic

resource "google_sql_source_representation_instance" "instance" {
  name             = "my-instance"
  region           = "us-central1"
  database_version = "MYSQL_5_7"
  host             = "10.20.30.40"
  port             = 3306
}

» Argument Reference

The following arguments are supported:

  • name - (Required) The name of the source representation instance. Use any valid Cloud SQL instance name.

  • database_version - (Required) The MySQL version running on your source database server. Possible values are MYSQL_5_6 and MYSQL_5_7.

  • host - (Required) The externally accessible IPv4 address for the source database server.


  • region - (Optional) The Region in which the created instance should reside. If it is not provided, the provider region is used.

  • port - (Optional) The externally accessible port for the source database server. Defaults to 3306.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

» Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/{{project}}/instances/{{name}}

» Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • delete - Default is 4 minutes.

» Import

SourceRepresentationInstance can be imported using any of these accepted formats:

$ terraform import google_sql_source_representation_instance.default projects/{{project}}/instances/{{name}}
$ terraform import google_sql_source_representation_instance.default {{project}}/{{name}}
$ terraform import google_sql_source_representation_instance.default {{name}}

» User Project Overrides

This resource supports User Project Overrides.