import * as pulumi from "@pulumi/pulumi"; /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const instance = new gcp.sql.SourceRepresentationInstance("instance", { * name: "my-instance", * region: "us-central1", * databaseVersion: "MYSQL_8_0", * host: "10.20.30.40", * port: 3306, * username: "some-user", * password: "password-for-the-user", * dumpFilePath: "gs://replica-bucket/source-database.sql.gz", * }); * ``` * ### Sql Source Representation Instance Postgres * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const instance = new gcp.sql.SourceRepresentationInstance("instance", { * name: "my-instance", * region: "us-central1", * databaseVersion: "POSTGRES_9_6", * host: "10.20.30.40", * port: 3306, * username: "some-user", * password: "password-for-the-user", * dumpFilePath: "gs://replica-bucket/source-database.sql.gz", * }); * ``` * * ## Import * * SourceRepresentationInstance can be imported using any of these accepted formats: * * * `projects/{{project}}/instances/{{name}}` * * * `{{project}}/{{name}}` * * * `{{name}}` * * When using the `pulumi import` command, SourceRepresentationInstance can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance default projects/{{project}}/instances/{{name}} * ``` * * ```sh * $ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance default {{project}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:sql/sourceRepresentationInstance:SourceRepresentationInstance default {{name}} * ``` */ export declare class SourceRepresentationInstance extends pulumi.CustomResource { /** * Get an existing SourceRepresentationInstance resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SourceRepresentationInstanceState, opts?: pulumi.CustomResourceOptions): SourceRepresentationInstance; /** * Returns true if the given object is an instance of SourceRepresentationInstance. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SourceRepresentationInstance; /** * The CA certificate on the external server. Include only if SSL/TLS is used on the external server. */ readonly caCertificate: pulumi.Output; /** * The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. */ readonly clientCertificate: pulumi.Output; /** * 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. */ readonly clientKey: pulumi.Output; /** * The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, MYSQL_8_4, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, POSTGRES_16, POSTGRES_17. Database Version Policies includes an up-to-date reference of supported versions. */ readonly databaseVersion: pulumi.Output; /** * A file in the bucket that contains the data from the external server. */ readonly dumpFilePath: pulumi.Output; /** * 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. */ readonly host: pulumi.Output; /** * The name of the source representation instance. Use any valid Cloud SQL instance name. */ readonly name: pulumi.Output; /** * The password for the replication user account. * **Note**: This property is sensitive and will not be displayed in the plan. */ readonly password: pulumi.Output; /** * The externally accessible port for the source database server. * Defaults to 3306. */ readonly port: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The Region in which the created instance should reside. * If it is not provided, the provider region is used. */ readonly region: pulumi.Output; /** * The replication user account on the external server. */ readonly username: pulumi.Output; /** * Create a SourceRepresentationInstance resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SourceRepresentationInstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SourceRepresentationInstance resources. */ export interface SourceRepresentationInstanceState { /** * The CA certificate on the external server. Include only if SSL/TLS is used on the external server. */ caCertificate?: pulumi.Input; /** * The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. */ clientCertificate?: pulumi.Input; /** * 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. */ clientKey?: pulumi.Input; /** * The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, MYSQL_8_4, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, POSTGRES_16, POSTGRES_17. Database Version Policies includes an up-to-date reference of supported versions. */ databaseVersion?: pulumi.Input; /** * A file in the bucket that contains the data from the external server. */ dumpFilePath?: pulumi.Input; /** * 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. */ host?: pulumi.Input; /** * The name of the source representation instance. Use any valid Cloud SQL instance name. */ name?: pulumi.Input; /** * The password for the replication user account. * **Note**: This property is sensitive and will not be displayed in the plan. */ password?: pulumi.Input; /** * The externally accessible port for the source database server. * Defaults to 3306. */ port?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The Region in which the created instance should reside. * If it is not provided, the provider region is used. */ region?: pulumi.Input; /** * The replication user account on the external server. */ username?: pulumi.Input; } /** * The set of arguments for constructing a SourceRepresentationInstance resource. */ export interface SourceRepresentationInstanceArgs { /** * The CA certificate on the external server. Include only if SSL/TLS is used on the external server. */ caCertificate?: pulumi.Input; /** * The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. */ clientCertificate?: pulumi.Input; /** * 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. */ clientKey?: pulumi.Input; /** * The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, MYSQL_8_4, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, POSTGRES_15, POSTGRES_16, POSTGRES_17. Database Version Policies includes an up-to-date reference of supported versions. */ databaseVersion: pulumi.Input; /** * A file in the bucket that contains the data from the external server. */ dumpFilePath?: pulumi.Input; /** * 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. */ host: pulumi.Input; /** * The name of the source representation instance. Use any valid Cloud SQL instance name. */ name?: pulumi.Input; /** * The password for the replication user account. * **Note**: This property is sensitive and will not be displayed in the plan. */ password?: pulumi.Input; /** * The externally accessible port for the source database server. * Defaults to 3306. */ port?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The Region in which the created instance should reside. * If it is not provided, the provider region is used. */ region?: pulumi.Input; /** * The replication user account on the external server. */ username?: pulumi.Input; }