SourceRepresentationInstanceArgs

data class SourceRepresentationInstanceArgs(val caCertificate: Output<String>? = null, val clientCertificate: Output<String>? = null, val clientKey: Output<String>? = null, val databaseVersion: Output<String>? = null, val dumpFilePath: Output<String>? = null, val host: Output<String>? = null, val name: Output<String>? = null, val password: Output<String>? = null, val port: Output<Int>? = null, val project: Output<String>? = null, val region: Output<String>? = null, val username: Output<String>? = null) : ConvertibleToJava<SourceRepresentationInstanceArgs>

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}}

Constructors

Link copied to clipboard
fun SourceRepresentationInstanceArgs(caCertificate: Output<String>? = null, clientCertificate: Output<String>? = null, clientKey: Output<String>? = null, databaseVersion: Output<String>? = null, dumpFilePath: Output<String>? = null, host: Output<String>? = null, name: Output<String>? = null, password: Output<String>? = null, port: Output<Int>? = null, project: Output<String>? = null, region: Output<String>? = null, username: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SourceRepresentationInstanceArgs

Properties

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

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

Link copied to clipboard
val clientCertificate: Output<String>? = null

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>? = null

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>? = null

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>? = null

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

Link copied to clipboard
val host: Output<String>? = null

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 name: Output<String>? = null

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

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

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>? = null

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

Link copied to clipboard
val project: Output<String>? = null

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 region: Output<String>? = null

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

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

The replication user account on the external server.