import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "../../types"; /** * Creates a new Cloud SQL instance. */ export declare class Instance extends pulumi.CustomResource { /** * Get an existing Instance 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Instance; /** * Returns true if the given object is an instance of Instance. 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 Instance; /** * *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. */ readonly backendType: pulumi.Output; /** * Connection name of the Cloud SQL instance used in connection strings. */ readonly connectionName: pulumi.Output; /** * The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. */ readonly currentDiskSize: pulumi.Output; /** * The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. */ readonly databaseVersion: pulumi.Output; /** * Disk encryption configuration specific to an instance. Applies only to Second Generation instances. */ readonly diskEncryptionConfiguration: pulumi.Output; /** * Disk encryption status specific to an instance. Applies only to Second Generation instances. */ readonly diskEncryptionStatus: pulumi.Output; /** * This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. */ readonly etag: pulumi.Output; /** * The name and status of the failover replica. This property is applicable only to Second Generation instances. */ readonly failoverReplica: pulumi.Output<{ [key: string]: string; }>; /** * The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. */ readonly gceZone: pulumi.Output; /** * The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. */ readonly instanceType: pulumi.Output; /** * The assigned IP addresses for the instance. */ readonly ipAddresses: pulumi.Output; /** * The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. */ readonly ipv6Address: pulumi.Output; /** * This is always *sql#instance*. */ readonly kind: pulumi.Output; /** * The name of the instance which will act as primary in the replication setup. */ readonly masterInstanceName: pulumi.Output; /** * The maximum disk size of the instance in bytes. */ readonly maxDiskSize: pulumi.Output; /** * Name of the Cloud SQL instance. This does not include the project ID. */ readonly name: pulumi.Output; /** * Configuration specific to on-premises instances. */ readonly onPremisesConfiguration: pulumi.Output; /** * The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. */ readonly project: pulumi.Output; /** * The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. */ readonly region: pulumi.Output; /** * Configuration specific to failover replicas and read replicas. */ readonly replicaConfiguration: pulumi.Output; /** * The replicas of the instance. */ readonly replicaNames: pulumi.Output; /** * Initial root password. Use only on creation. */ readonly rootPassword: pulumi.Output; /** * The status indicating if instance satisfiesPzs. Reserved for future use. */ readonly satisfiesPzs: pulumi.Output; /** * The start time of any upcoming scheduled maintenance for this instance. */ readonly scheduledMaintenance: pulumi.Output; /** * The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. */ readonly secondaryGceZone: pulumi.Output; /** * The URI of this resource. */ readonly selfLink: pulumi.Output; /** * SSL configuration. */ readonly serverCaCert: pulumi.Output; /** * The service account email address assigned to the instance. This property is applicable only to Second Generation instances. */ readonly serviceAccountEmailAddress: pulumi.Output; /** * The user settings. */ readonly settings: pulumi.Output; /** * The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. */ readonly state: pulumi.Output; /** * If the instance state is SUSPENDED, the reason for the suspension. */ readonly suspensionReason: pulumi.Output; /** * Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Instance resource. */ export interface InstanceArgs { /** * *SECOND_GEN*: Cloud SQL database instance. *EXTERNAL*: A database server that is not managed by Google. This property is read-only; use the *tier* property in the *settings* object to determine the database type. */ readonly backendType?: pulumi.Input; /** * Connection name of the Cloud SQL instance used in connection strings. */ readonly connectionName?: pulumi.Input; /** * The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see this announcement for details. */ readonly currentDiskSize?: pulumi.Input; /** * The database engine type and version. The *databaseVersion* field cannot be changed after instance creation. MySQL instances: *MYSQL_8_0*, *MYSQL_5_7* (default), or *MYSQL_5_6*. PostgreSQL instances: *POSTGRES_9_6*, *POSTGRES_10*, *POSTGRES_11*, *POSTGRES_12*, or *POSTGRES_13* (default). SQL Server instances: *SQLSERVER_2017_STANDARD* (default), *SQLSERVER_2017_ENTERPRISE*, *SQLSERVER_2017_EXPRESS*, or *SQLSERVER_2017_WEB*. */ readonly databaseVersion?: pulumi.Input; /** * Disk encryption configuration specific to an instance. Applies only to Second Generation instances. */ readonly diskEncryptionConfiguration?: pulumi.Input; /** * Disk encryption status specific to an instance. Applies only to Second Generation instances. */ readonly diskEncryptionStatus?: pulumi.Input; /** * This field is deprecated and will be removed from a future version of the API. Use the *settings.settingsVersion* field instead. */ readonly etag?: pulumi.Input; /** * The name and status of the failover replica. This property is applicable only to Second Generation instances. */ readonly failoverReplica?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. */ readonly gceZone?: pulumi.Input; readonly instance: pulumi.Input; /** * The instance type. This can be one of the following. *CLOUD_SQL_INSTANCE*: A Cloud SQL instance that is not replicating from a primary instance. *ON_PREMISES_INSTANCE*: An instance running on the customer's premises. *READ_REPLICA_INSTANCE*: A Cloud SQL instance configured as a read-replica. */ readonly instanceType?: pulumi.Input; /** * The assigned IP addresses for the instance. */ readonly ipAddresses?: pulumi.Input[]>; /** * The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances. */ readonly ipv6Address?: pulumi.Input; /** * This is always *sql#instance*. */ readonly kind?: pulumi.Input; /** * The name of the instance which will act as primary in the replication setup. */ readonly masterInstanceName?: pulumi.Input; /** * The maximum disk size of the instance in bytes. */ readonly maxDiskSize?: pulumi.Input; /** * Name of the Cloud SQL instance. This does not include the project ID. */ readonly name?: pulumi.Input; /** * Configuration specific to on-premises instances. */ readonly onPremisesConfiguration?: pulumi.Input; /** * The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable. */ readonly project: pulumi.Input; /** * The geographical region. Can be *us-central* (*FIRST_GEN* instances only) *us-central1* (*SECOND_GEN* instances only) *asia-east1* or *europe-west1*. Defaults to *us-central* or *us-central1* depending on the instance type. The region cannot be changed after instance creation. */ readonly region?: pulumi.Input; /** * Configuration specific to failover replicas and read replicas. */ readonly replicaConfiguration?: pulumi.Input; /** * The replicas of the instance. */ readonly replicaNames?: pulumi.Input[]>; /** * Initial root password. Use only on creation. */ readonly rootPassword?: pulumi.Input; /** * The status indicating if instance satisfiesPzs. Reserved for future use. */ readonly satisfiesPzs?: pulumi.Input; /** * The start time of any upcoming scheduled maintenance for this instance. */ readonly scheduledMaintenance?: pulumi.Input; /** * The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone. Reserved for future use. */ readonly secondaryGceZone?: pulumi.Input; /** * The URI of this resource. */ readonly selfLink?: pulumi.Input; /** * SSL configuration. */ readonly serverCaCert?: pulumi.Input; /** * The service account email address assigned to the instance. This property is applicable only to Second Generation instances. */ readonly serviceAccountEmailAddress?: pulumi.Input; /** * The user settings. */ readonly settings?: pulumi.Input; /** * The current serving state of the Cloud SQL instance. This can be one of the following. *SQL_INSTANCE_STATE_UNSPECIFIED*: The state of the instance is unknown. *RUNNABLE*: The instance is running, or has been stopped by owner. *SUSPENDED*: The instance is not available, for example due to problems with billing. *PENDING_DELETE*: The instance is being deleted. *PENDING_CREATE*: The instance is being created. *MAINTENANCE*: The instance is down for maintenance. *FAILED*: The instance creation failed. */ readonly state?: pulumi.Input; /** * If the instance state is SUSPENDED, the reason for the suspension. */ readonly suspensionReason?: pulumi.Input[]>; }