SourceRepresentationInstance

class SourceRepresentationInstance : KotlinCustomResource

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

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.sql.SourceRepresentationInstance;
import com.pulumi.gcp.sql.SourceRepresentationInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var instance = new SourceRepresentationInstance("instance", SourceRepresentationInstanceArgs.builder()
.databaseVersion("MYSQL_8_0")
.dumpFilePath("gs://replica-bucket/source-database.sql.gz")
.host("10.20.30.40")
.password("password-for-the-user")
.port(3306)
.region("us-central1")
.username("some-user")
.build());
}
}

Sql Source Representation Instance Postgres

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.sql.SourceRepresentationInstance;
import com.pulumi.gcp.sql.SourceRepresentationInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var instance = new SourceRepresentationInstance("instance", SourceRepresentationInstanceArgs.builder()
.databaseVersion("POSTGRES_9_6")
.dumpFilePath("gs://replica-bucket/source-database.sql.gz")
.host("10.20.30.40")
.password("password-for-the-user")
.port(3306)
.region("us-central1")
.username("some-user")
.build());
}
}

Import

SourceRepresentationInstance can be imported using any of these accepted formats* projects/{{project}}/instances/{{name}} * {{project}}/{{name}} * {{name}} In Terraform v1.5.0 and later, use an import block to import SourceRepresentationInstance using one of the formats above. For exampletf import { id = "projects/{{project}}/instances/{{name}}" to = google_sql_source_representation_instance.default }

$ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), SourceRepresentationInstance can be imported using one of the formats above. For example
$ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance default projects/{{project}}/instances/{{name}}
$ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance default {{project}}/{{name}}
$ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance default {{name}}

Properties

Link copied to clipboard
val caCertificate: Output<String>?

The CA certificate on the external server. Include only if SSL/TLS is used on the external server.

Link copied to clipboard

The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.

Link copied to clipboard
val clientKey: Output<String>?

The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.

Link copied to clipboard
val databaseVersion: Output<String>

The MySQL version running on your source database server. Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14.

Link copied to clipboard
val dumpFilePath: Output<String>?

A file in the bucket that contains the data from the external server.

Link copied to clipboard
val host: Output<String>

The IPv4 address and port for the external server, or the the DNS address for the external server. If the external server is hosted on Cloud SQL, the port is 5432.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the source representation instance. Use any valid Cloud SQL instance name.

Link copied to clipboard
val password: Output<String>?

The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.

Link copied to clipboard
val port: Output<Int>?

The externally accessible port for the source database server. Defaults to 3306.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val region: Output<String>

The Region in which the created instance should reside. If it is not provided, the provider region is used.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val username: Output<String>?

The replication user account on the external server.