gcp.sql.SourceRepresentationInstance
Explore with Pulumi AI
- Example Usage
- Sql Source Representation Instance Basic
- Sql Source Representation Instance Postgres
- Create SourceRepresentationInstance Resource
- Constructor syntax
- Constructor example
- SourceRepresentationInstance Resource Properties
- Inputs
- Outputs
- Look up Existing SourceRepresentationInstance Resource
- Import
- Package Details
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
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",
});
import pulumi
import pulumi_gcp as gcp
instance = gcp.sql.SourceRepresentationInstance("instance",
name="my-instance",
region="us-central1",
database_version="MYSQL_8_0",
host="10.20.30.40",
port=3306,
username="some-user",
password="password-for-the-user",
dump_file_path="gs://replica-bucket/source-database.sql.gz")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewSourceRepresentationInstance(ctx, "instance", &sql.SourceRepresentationInstanceArgs{
Name: pulumi.String("my-instance"),
Region: pulumi.String("us-central1"),
DatabaseVersion: pulumi.String("MYSQL_8_0"),
Host: pulumi.String("10.20.30.40"),
Port: pulumi.Int(3306),
Username: pulumi.String("some-user"),
Password: pulumi.String("password-for-the-user"),
DumpFilePath: pulumi.String("gs://replica-bucket/source-database.sql.gz"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var instance = new Gcp.Sql.SourceRepresentationInstance("instance", new()
{
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",
});
});
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()
.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")
.build());
}
}
resources:
instance:
type: gcp:sql:SourceRepresentationInstance
properties:
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
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 pulumi
import pulumi_gcp as gcp
instance = gcp.sql.SourceRepresentationInstance("instance",
name="my-instance",
region="us-central1",
database_version="POSTGRES_9_6",
host="10.20.30.40",
port=3306,
username="some-user",
password="password-for-the-user",
dump_file_path="gs://replica-bucket/source-database.sql.gz")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewSourceRepresentationInstance(ctx, "instance", &sql.SourceRepresentationInstanceArgs{
Name: pulumi.String("my-instance"),
Region: pulumi.String("us-central1"),
DatabaseVersion: pulumi.String("POSTGRES_9_6"),
Host: pulumi.String("10.20.30.40"),
Port: pulumi.Int(3306),
Username: pulumi.String("some-user"),
Password: pulumi.String("password-for-the-user"),
DumpFilePath: pulumi.String("gs://replica-bucket/source-database.sql.gz"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var instance = new Gcp.Sql.SourceRepresentationInstance("instance", new()
{
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",
});
});
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()
.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")
.build());
}
}
resources:
instance:
type: gcp:sql:SourceRepresentationInstance
properties:
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
Create SourceRepresentationInstance Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SourceRepresentationInstance(name: string, args: SourceRepresentationInstanceArgs, opts?: CustomResourceOptions);
@overload
def SourceRepresentationInstance(resource_name: str,
args: SourceRepresentationInstanceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SourceRepresentationInstance(resource_name: str,
opts: Optional[ResourceOptions] = None,
database_version: Optional[str] = None,
host: Optional[str] = None,
ca_certificate: Optional[str] = None,
client_certificate: Optional[str] = None,
client_key: Optional[str] = None,
dump_file_path: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
port: Optional[int] = None,
project: Optional[str] = None,
region: Optional[str] = None,
username: Optional[str] = None)
func NewSourceRepresentationInstance(ctx *Context, name string, args SourceRepresentationInstanceArgs, opts ...ResourceOption) (*SourceRepresentationInstance, error)
public SourceRepresentationInstance(string name, SourceRepresentationInstanceArgs args, CustomResourceOptions? opts = null)
public SourceRepresentationInstance(String name, SourceRepresentationInstanceArgs args)
public SourceRepresentationInstance(String name, SourceRepresentationInstanceArgs args, CustomResourceOptions options)
type: gcp:sql:SourceRepresentationInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SourceRepresentationInstanceArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. SourceRepresentationInstanceArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SourceRepresentationInstanceArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SourceRepresentationInstanceArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. SourceRepresentationInstanceArgs - The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var sourceRepresentationInstanceResource = new Gcp.Sql.SourceRepresentationInstance("sourceRepresentationInstanceResource", new()
{
DatabaseVersion = "string",
Host = "string",
CaCertificate = "string",
ClientCertificate = "string",
ClientKey = "string",
DumpFilePath = "string",
Name = "string",
Password = "string",
Port = 0,
Project = "string",
Region = "string",
Username = "string",
});
example, err := sql.NewSourceRepresentationInstance(ctx, "sourceRepresentationInstanceResource", &sql.SourceRepresentationInstanceArgs{
DatabaseVersion: pulumi.String("string"),
Host: pulumi.String("string"),
CaCertificate: pulumi.String("string"),
ClientCertificate: pulumi.String("string"),
ClientKey: pulumi.String("string"),
DumpFilePath: pulumi.String("string"),
Name: pulumi.String("string"),
Password: pulumi.String("string"),
Port: pulumi.Int(0),
Project: pulumi.String("string"),
Region: pulumi.String("string"),
Username: pulumi.String("string"),
})
var sourceRepresentationInstanceResource = new SourceRepresentationInstance("sourceRepresentationInstanceResource", SourceRepresentationInstanceArgs.builder()
.databaseVersion("string")
.host("string")
.caCertificate("string")
.clientCertificate("string")
.clientKey("string")
.dumpFilePath("string")
.name("string")
.password("string")
.port(0)
.project("string")
.region("string")
.username("string")
.build());
source_representation_instance_resource = gcp.sql.SourceRepresentationInstance("sourceRepresentationInstanceResource",
database_version="string",
host="string",
ca_certificate="string",
client_certificate="string",
client_key="string",
dump_file_path="string",
name="string",
password="string",
port=0,
project="string",
region="string",
username="string")
const sourceRepresentationInstanceResource = new gcp.sql.SourceRepresentationInstance("sourceRepresentationInstanceResource", {
databaseVersion: "string",
host: "string",
caCertificate: "string",
clientCertificate: "string",
clientKey: "string",
dumpFilePath: "string",
name: "string",
password: "string",
port: 0,
project: "string",
region: "string",
username: "string",
});
type: gcp:sql:SourceRepresentationInstance
properties:
caCertificate: string
clientCertificate: string
clientKey: string
databaseVersion: string
dumpFilePath: string
host: string
name: string
password: string
port: 0
project: string
region: string
username: string
SourceRepresentationInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SourceRepresentationInstance resource accepts the following input properties:
- Database
Version This property is required. Changes to this property will trigger replacement.
- 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.
- Host
This property is required. Changes to this property will trigger replacement.
- 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.
- Ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- Client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- Client
Key Changes to this property will trigger replacement.
- 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.
- Dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- Name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- Password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- Port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- Project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- Username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- Database
Version This property is required. Changes to this property will trigger replacement.
- 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.
- Host
This property is required. Changes to this property will trigger replacement.
- 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.
- Ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- Client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- Client
Key Changes to this property will trigger replacement.
- 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.
- Dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- Name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- Password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- Port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- Project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- Username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- database
Version This property is required. Changes to this property will trigger replacement.
- 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.
- host
This property is required. Changes to this property will trigger replacement.
- 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.
- ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client
Key Changes to this property will trigger replacement.
- 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.
- dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- database
Version This property is required. Changes to this property will trigger replacement.
- 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.
- host
This property is required. Changes to this property will trigger replacement.
- 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.
- ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client
Key Changes to this property will trigger replacement.
- 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.
- dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- database_
version This property is required. Changes to this property will trigger replacement.
- 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.
- host
This property is required. Changes to this property will trigger replacement.
- 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.
- ca_
certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client_
certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client_
key Changes to this property will trigger replacement.
- 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.
- dump_
file_ path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- database
Version This property is required. Changes to this property will trigger replacement.
- 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.
- host
This property is required. Changes to this property will trigger replacement.
- 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.
- ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client
Key Changes to this property will trigger replacement.
- 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.
- dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
Outputs
All input properties are implicitly available as output properties. Additionally, the SourceRepresentationInstance resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SourceRepresentationInstance Resource
Get an existing SourceRepresentationInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SourceRepresentationInstanceState, opts?: CustomResourceOptions): SourceRepresentationInstance
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ca_certificate: Optional[str] = None,
client_certificate: Optional[str] = None,
client_key: Optional[str] = None,
database_version: Optional[str] = None,
dump_file_path: Optional[str] = None,
host: Optional[str] = None,
name: Optional[str] = None,
password: Optional[str] = None,
port: Optional[int] = None,
project: Optional[str] = None,
region: Optional[str] = None,
username: Optional[str] = None) -> SourceRepresentationInstance
func GetSourceRepresentationInstance(ctx *Context, name string, id IDInput, state *SourceRepresentationInstanceState, opts ...ResourceOption) (*SourceRepresentationInstance, error)
public static SourceRepresentationInstance Get(string name, Input<string> id, SourceRepresentationInstanceState? state, CustomResourceOptions? opts = null)
public static SourceRepresentationInstance get(String name, Output<String> id, SourceRepresentationInstanceState state, CustomResourceOptions options)
resources: _: type: gcp:sql:SourceRepresentationInstance get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- Client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- Client
Key Changes to this property will trigger replacement.
- 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.
- Database
Version Changes to this property will trigger replacement.
- 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.
- Dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- Host
Changes to this property will trigger replacement.
- 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.
- Name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- Password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- Port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- Project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- Username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- Ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- Client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- Client
Key Changes to this property will trigger replacement.
- 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.
- Database
Version Changes to this property will trigger replacement.
- 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.
- Dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- Host
Changes to this property will trigger replacement.
- 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.
- Name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- Password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- Port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- Project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- Username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client
Key Changes to this property will trigger replacement.
- 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.
- database
Version Changes to this property will trigger replacement.
- 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.
- dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- host
Changes to this property will trigger replacement.
- 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.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client
Key Changes to this property will trigger replacement.
- 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.
- database
Version Changes to this property will trigger replacement.
- 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.
- dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- host
Changes to this property will trigger replacement.
- 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.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- ca_
certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client_
certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client_
key Changes to this property will trigger replacement.
- 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.
- database_
version Changes to this property will trigger replacement.
- 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.
- dump_
file_ path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- host
Changes to this property will trigger replacement.
- 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.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
- ca
Certificate Changes to this property will trigger replacement.
- The CA certificate on the external server. Include only if SSL/TLS is used on the external server.
- client
Certificate Changes to this property will trigger replacement.
- The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server.
- client
Key Changes to this property will trigger replacement.
- 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.
- database
Version Changes to this property will trigger replacement.
- 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.
- dump
File Path Changes to this property will trigger replacement.
- A file in the bucket that contains the data from the external server.
- host
Changes to this property will trigger replacement.
- 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.
- name
Changes to this property will trigger replacement.
- The name of the source representation instance. Use any valid Cloud SQL instance name.
- password
Changes to this property will trigger replacement.
- The password for the replication user account. Note: This property is sensitive and will not be displayed in the plan.
- port
Changes to this property will trigger replacement.
- The externally accessible port for the source database server. Defaults to 3306.
- project
Changes to this property will trigger replacement.
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- region
Changes to this property will trigger replacement.
- The Region in which the created instance should reside. If it is not provided, the provider region is used.
- username
Changes to this property will trigger replacement.
- The replication user account on the external server.
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:
$ 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}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.
- Example Usage
- Sql Source Representation Instance Basic
- Sql Source Representation Instance Postgres
- Create SourceRepresentationInstance Resource
- Constructor syntax
- Constructor example
- SourceRepresentationInstance Resource Properties
- Inputs
- Outputs
- Look up Existing SourceRepresentationInstance Resource
- Import
- Package Details