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.
Warning: All arguments including the following potentially sensitive values will be stored in the raw state as plain text:
on_premises_configuration.password
. Read more about sensitive data in state.
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
$ 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
The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
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
.
A file in the bucket that contains the data from the external server.