Module sql

@pulumi/gcp > sql

class Database

extends CustomResource

Creates a new Google SQL Database on a Google SQL Database Instance. For more information, see the official documentation, or the JSON API.

Example Usage

Example creating a SQL Database.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const master = new gcp.sql.DatabaseInstance("master", {
    settings: {
        tier: "D0",
    },
});
const users = new gcp.sql.Database("users", {
    charset: "latin1",
    collation: "latin1_swedish_ci",
    instance: master.name,
});

constructor

new Database(name: string, args: DatabaseArgs, opts?: pulumi.CustomResourceOptions)

Create a Database resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseState, opts?: pulumi.CustomResourceOptions): Database

Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property charset

public charset: pulumi.Output<string>;

The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases are in beta and have limited charset support; they only support a value of UTF8 at creation time.

property collation

public collation: pulumi.Output<string>;

The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases are in beta and have limited collation support; they only support a value of en_US.UTF8 at creation time.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instance

public instance: pulumi.Output<string>;

The name of containing instance.

property name

public name: pulumi.Output<string>;

The name of the database.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class DatabaseInstance

extends CustomResource

Creates a new Google SQL Database Instance. For more information, see the official documentation, or the JSON API.

NOTE on google_sql_database_instance: - Second-generation instances include a default ‘root’@’%’ user with no password. This user will be deleted by Terraform on instance creation. You should use google_sql_user to define a custom user with a restricted host and strong password.

Example Usage

SQL First Generation

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const master = new gcp.sql.DatabaseInstance("master", {
    databaseVersion: "MYSQL_5_6",
    // First-generation instance regions are not the conventional
    // Google Compute Engine regions. See argument reference below.
    region: "us-central",
    settings: {
        tier: "D0",
    },
});

SQL Second generation

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const master = new gcp.sql.DatabaseInstance("master", {
    databaseVersion: "POSTGRES_9_6",
    region: "us-central1",
    settings: {
        // Second-generation instance tiers are based on the machine
        // type. See argument reference below.
        tier: "db-f1-micro",
    },
});

Private IP Instance

NOTE: For private IP instance setup, note that the google_sql_database_instance does not actually interpolate values from google_service_networking_connection. You must explicitly add a depends_onreference as shown below.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const privateNetwork = new gcp.compute.Network("private_network", {});
const privateIpAddress = new gcp.compute.GlobalAddress("private_ip_address", {
    addressType: "INTERNAL",
    network: privateNetwork.selfLink,
    prefixLength: 16,
    purpose: "VPC_PEERING",
});
const privateVpcConnection = new gcp.servicenetworking.Connection("private_vpc_connection", {
    network: privateNetwork.selfLink,
    reservedPeeringRanges: [privateIpAddress.name],
    service: "servicenetworking.googleapis.com",
});
const instance = new gcp.sql.DatabaseInstance("instance", {
    region: "us-central1",
    settings: {
        ipConfiguration: {
            ipv4Enabled: false,
            privateNetwork: privateNetwork.selfLink,
        },
        tier: "db-f1-micro",
    },
}, {dependsOn: [privateVpcConnection]});

constructor

new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: pulumi.CustomResourceOptions)

Create a DatabaseInstance resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseInstanceState, opts?: pulumi.CustomResourceOptions): DatabaseInstance

Get an existing DatabaseInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property connectionName

public connectionName: pulumi.Output<string>;

The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.

property databaseVersion

public databaseVersion: pulumi.Output<string | undefined>;

The MySQL version to use. Can be MYSQL_5_6, MYSQL_5_7 or POSTGRES_9_6 for second-generation instances, or MYSQL_5_5 or MYSQL_5_6 for first-generation instances. See Second Generation Capabilities for more information.

property firstIpAddress

public firstIpAddress: pulumi.Output<string>;

The first IPv4 address of any type assigned. This is to support accessing the first address in the list in a terraform output when the resource is configured with a count.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property ipAddresses

public ipAddresses: pulumi.Output<{
    ipAddress: string;
    timeToRetire: string;
    type: string;
}[]>;

property masterInstanceName

public masterInstanceName: pulumi.Output<string>;

The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.

property name

public name: pulumi.Output<string>;

The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.

property privateIpAddress

public privateIpAddress: pulumi.Output<string>;

The first private (PRIVATE) IPv4 address assigned. This is a workaround for an issue fixed in Terraform 0.12 but also provides a convenient way to access an IP of a specific type without performing filtering in a Terraform config.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property publicIpAddress

public publicIpAddress: pulumi.Output<string>;

The first public (PRIMARY) IPv4 address assigned. This is a workaround for an issue fixed in Terraform 0.12 but also provides a convenient way to access an IP of a specific type without performing filtering in a Terraform config.

property region

public region: pulumi.Output<string>;

The region the instance will sit in. Note, first-generation Cloud SQL instance regions do not line up with the Google Compute Engine (GCE) regions, and Cloud SQL is not available in all regions - choose from one of the options listed here. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for all first-generation instances and for second-generation instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this.

property replicaConfiguration

public replicaConfiguration: pulumi.Output<{
    caCertificate: string;
    clientCertificate: string;
    clientKey: string;
    connectRetryInterval: number;
    dumpFilePath: string;
    failoverTarget: boolean;
    masterHeartbeatPeriod: number;
    password: string;
    sslCipher: string;
    username: string;
    verifyServerCertificate: boolean;
}>;

The configuration for replication. The configuration is detailed below.

public selfLink: pulumi.Output<string>;

The URI of the created resource.

property serverCaCert

public serverCaCert: pulumi.Output<{
    cert: string;
    commonName: string;
    createTime: string;
    expirationTime: string;
    sha1Fingerprint: string;
}>;

property serviceAccountEmailAddress

public serviceAccountEmailAddress: pulumi.Output<string>;

The service account email address assigned to the instance. This property is applicable only to Second Generation instances.

property settings

public settings: pulumi.Output<{
    activationPolicy: string;
    authorizedGaeApplications: string[];
    availabilityType: string;
    backupConfiguration: {
        binaryLogEnabled: boolean;
        enabled: boolean;
        startTime: string;
    };
    crashSafeReplication: boolean;
    databaseFlags: {
        name: string;
        value: string;
    }[];
    diskAutoresize: boolean;
    diskSize: number;
    diskType: string;
    ipConfiguration: {
        authorizedNetworks: {
            expirationTime: string;
            name: string;
            value: string;
        }[];
        ipv4Enabled: boolean;
        privateNetwork: string;
        requireSsl: boolean;
    };
    locationPreference: {
        followGaeApplication: string;
        zone: string;
    };
    maintenanceWindow: {
        day: number;
        hour: number;
        updateTrack: string;
    };
    pricingPlan: string;
    replicationType: string;
    tier: string;
    userLabels: {[key: string]: string};
    version: number;
}>;

The settings to use for the database. The configuration is detailed below.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class SslCert

extends CustomResource

Creates a new Google SQL SSL Cert on a Google SQL Instance. For more information, see the official documentation, or the JSON API.

Note: All arguments including the private key will be stored in the raw state as plain-text. Read more about sensitive data in state.

Example Usage

Example creating a SQL Client Certificate.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const master = new gcp.sql.DatabaseInstance("master", {
    settings: {
        tier: "D0",
    },
});
const clientCert = new gcp.sql.SslCert("client_cert", {
    commonName: "client-name",
    instance: master.name,
});

constructor

new SslCert(name: string, args: SslCertArgs, opts?: pulumi.CustomResourceOptions)

Create a SslCert resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SslCertState, opts?: pulumi.CustomResourceOptions): SslCert

Get an existing SslCert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property cert

public cert: pulumi.Output<string>;

The actual certificate data for this client certificate.

property certSerialNumber

public certSerialNumber: pulumi.Output<string>;

The serial number extracted from the certificate data.

property commonName

public commonName: pulumi.Output<string>;

The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created.

property createTime

public createTime: pulumi.Output<string>;

The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

property expirationTime

public expirationTime: pulumi.Output<string>;

The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instance

public instance: pulumi.Output<string>;

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

property privateKey

public privateKey: pulumi.Output<string>;

The private key associated with the client certificate.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property serverCaCert

public serverCaCert: pulumi.Output<string>;

The CA cert of the server this client cert was generated from.

property sha1Fingerprint

public sha1Fingerprint: pulumi.Output<string>;

The SHA1 Fingerprint of the certificate.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

class User

extends CustomResource

Creates a new Google SQL User on a Google SQL User Instance. For more information, see the official documentation, or the JSON API.

Note: All arguments including the username and password will be stored in the raw state as plain-text. Read more about sensitive data in state. Passwords will not be retrieved when running “terraform import”.

Example Usage

Example creating a SQL User.

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const master = new gcp.sql.DatabaseInstance("master", {
    settings: {
        tier: "D0",
    },
});
const users = new gcp.sql.User("users", {
    host: "me.com",
    instance: master.name,
    password: "changeme",
});

constructor

new User(name: string, args: UserArgs, opts?: pulumi.CustomResourceOptions)

Create a User resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserState, opts?: pulumi.CustomResourceOptions): User

Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

Returns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property host

public host: pulumi.Output<string | undefined>;

The host the user can connect from. This is only supported for MySQL instances. Don’t set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property instance

public instance: pulumi.Output<string>;

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

property name

public name: pulumi.Output<string>;

The name of the user. Changing this forces a new resource to be created.

property password

public password: pulumi.Output<string | undefined>;

The password for the user. Can be updated.

property project

public project: pulumi.Output<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface DatabaseArgs

The set of arguments for constructing a Database resource.

property charset

charset?: pulumi.Input<string>;

The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases are in beta and have limited charset support; they only support a value of UTF8 at creation time.

property collation

collation?: pulumi.Input<string>;

The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases are in beta and have limited collation support; they only support a value of en_US.UTF8 at creation time.

property instance

instance: pulumi.Input<string>;

The name of containing instance.

property name

name?: pulumi.Input<string>;

The name of the database.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

interface DatabaseInstanceArgs

The set of arguments for constructing a DatabaseInstance resource.

property databaseVersion

databaseVersion?: pulumi.Input<string>;

The MySQL version to use. Can be MYSQL_5_6, MYSQL_5_7 or POSTGRES_9_6 for second-generation instances, or MYSQL_5_5 or MYSQL_5_6 for first-generation instances. See Second Generation Capabilities for more information.

property masterInstanceName

masterInstanceName?: pulumi.Input<string>;

The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.

property name

name?: pulumi.Input<string>;

The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property region

region?: pulumi.Input<string>;

The region the instance will sit in. Note, first-generation Cloud SQL instance regions do not line up with the Google Compute Engine (GCE) regions, and Cloud SQL is not available in all regions - choose from one of the options listed here. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for all first-generation instances and for second-generation instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this.

property replicaConfiguration

replicaConfiguration?: pulumi.Input<{
    caCertificate: pulumi.Input<string>;
    clientCertificate: pulumi.Input<string>;
    clientKey: pulumi.Input<string>;
    connectRetryInterval: pulumi.Input<number>;
    dumpFilePath: pulumi.Input<string>;
    failoverTarget: pulumi.Input<boolean>;
    masterHeartbeatPeriod: pulumi.Input<number>;
    password: pulumi.Input<string>;
    sslCipher: pulumi.Input<string>;
    username: pulumi.Input<string>;
    verifyServerCertificate: pulumi.Input<boolean>;
}>;

The configuration for replication. The configuration is detailed below.

property settings

settings: pulumi.Input<{
    activationPolicy: pulumi.Input<string>;
    authorizedGaeApplications: pulumi.Input<pulumi.Input<string>[]>;
    availabilityType: pulumi.Input<string>;
    backupConfiguration: pulumi.Input<{
        binaryLogEnabled: pulumi.Input<boolean>;
        enabled: pulumi.Input<boolean>;
        startTime: pulumi.Input<string>;
    }>;
    crashSafeReplication: pulumi.Input<boolean>;
    databaseFlags: pulumi.Input<pulumi.Input<{
        name: pulumi.Input<string>;
        value: pulumi.Input<string>;
    }>[]>;
    diskAutoresize: pulumi.Input<boolean>;
    diskSize: pulumi.Input<number>;
    diskType: pulumi.Input<string>;
    ipConfiguration: pulumi.Input<{
        authorizedNetworks: pulumi.Input<pulumi.Input<{
            expirationTime: pulumi.Input<string>;
            name: pulumi.Input<string>;
            value: pulumi.Input<string>;
        }>[]>;
        ipv4Enabled: pulumi.Input<boolean>;
        privateNetwork: pulumi.Input<string>;
        requireSsl: pulumi.Input<boolean>;
    }>;
    locationPreference: pulumi.Input<{
        followGaeApplication: pulumi.Input<string>;
        zone: pulumi.Input<string>;
    }>;
    maintenanceWindow: pulumi.Input<{
        day: pulumi.Input<number>;
        hour: pulumi.Input<number>;
        updateTrack: pulumi.Input<string>;
    }>;
    pricingPlan: pulumi.Input<string>;
    replicationType: pulumi.Input<string>;
    tier: pulumi.Input<string>;
    userLabels: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
    version: pulumi.Input<number>;
}>;

The settings to use for the database. The configuration is detailed below.

interface DatabaseInstanceState

Input properties used for looking up and filtering DatabaseInstance resources.

property connectionName

connectionName?: pulumi.Input<string>;

The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.

property databaseVersion

databaseVersion?: pulumi.Input<string>;

The MySQL version to use. Can be MYSQL_5_6, MYSQL_5_7 or POSTGRES_9_6 for second-generation instances, or MYSQL_5_5 or MYSQL_5_6 for first-generation instances. See Second Generation Capabilities for more information.

property firstIpAddress

firstIpAddress?: pulumi.Input<string>;

The first IPv4 address of any type assigned. This is to support accessing the first address in the list in a terraform output when the resource is configured with a count.

property ipAddresses

ipAddresses?: pulumi.Input<pulumi.Input<{
    ipAddress: pulumi.Input<string>;
    timeToRetire: pulumi.Input<string>;
    type: pulumi.Input<string>;
}>[]>;

property masterInstanceName

masterInstanceName?: pulumi.Input<string>;

The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups.

property name

name?: pulumi.Input<string>;

The name of the instance. If the name is left blank, Terraform will randomly generate one when the instance is first created. This is done because after a name is used, it cannot be reused for up to one week.

property privateIpAddress

privateIpAddress?: pulumi.Input<string>;

The first private (PRIVATE) IPv4 address assigned. This is a workaround for an issue fixed in Terraform 0.12 but also provides a convenient way to access an IP of a specific type without performing filtering in a Terraform config.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property publicIpAddress

publicIpAddress?: pulumi.Input<string>;

The first public (PRIMARY) IPv4 address assigned. This is a workaround for an issue fixed in Terraform 0.12 but also provides a convenient way to access an IP of a specific type without performing filtering in a Terraform config.

property region

region?: pulumi.Input<string>;

The region the instance will sit in. Note, first-generation Cloud SQL instance regions do not line up with the Google Compute Engine (GCE) regions, and Cloud SQL is not available in all regions - choose from one of the options listed here. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for all first-generation instances and for second-generation instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this.

property replicaConfiguration

replicaConfiguration?: pulumi.Input<{
    caCertificate: pulumi.Input<string>;
    clientCertificate: pulumi.Input<string>;
    clientKey: pulumi.Input<string>;
    connectRetryInterval: pulumi.Input<number>;
    dumpFilePath: pulumi.Input<string>;
    failoverTarget: pulumi.Input<boolean>;
    masterHeartbeatPeriod: pulumi.Input<number>;
    password: pulumi.Input<string>;
    sslCipher: pulumi.Input<string>;
    username: pulumi.Input<string>;
    verifyServerCertificate: pulumi.Input<boolean>;
}>;

The configuration for replication. The configuration is detailed below.

selfLink?: pulumi.Input<string>;

The URI of the created resource.

property serverCaCert

serverCaCert?: pulumi.Input<{
    cert: pulumi.Input<string>;
    commonName: pulumi.Input<string>;
    createTime: pulumi.Input<string>;
    expirationTime: pulumi.Input<string>;
    sha1Fingerprint: pulumi.Input<string>;
}>;

property serviceAccountEmailAddress

serviceAccountEmailAddress?: pulumi.Input<string>;

The service account email address assigned to the instance. This property is applicable only to Second Generation instances.

property settings

settings?: pulumi.Input<{
    activationPolicy: pulumi.Input<string>;
    authorizedGaeApplications: pulumi.Input<pulumi.Input<string>[]>;
    availabilityType: pulumi.Input<string>;
    backupConfiguration: pulumi.Input<{
        binaryLogEnabled: pulumi.Input<boolean>;
        enabled: pulumi.Input<boolean>;
        startTime: pulumi.Input<string>;
    }>;
    crashSafeReplication: pulumi.Input<boolean>;
    databaseFlags: pulumi.Input<pulumi.Input<{
        name: pulumi.Input<string>;
        value: pulumi.Input<string>;
    }>[]>;
    diskAutoresize: pulumi.Input<boolean>;
    diskSize: pulumi.Input<number>;
    diskType: pulumi.Input<string>;
    ipConfiguration: pulumi.Input<{
        authorizedNetworks: pulumi.Input<pulumi.Input<{
            expirationTime: pulumi.Input<string>;
            name: pulumi.Input<string>;
            value: pulumi.Input<string>;
        }>[]>;
        ipv4Enabled: pulumi.Input<boolean>;
        privateNetwork: pulumi.Input<string>;
        requireSsl: pulumi.Input<boolean>;
    }>;
    locationPreference: pulumi.Input<{
        followGaeApplication: pulumi.Input<string>;
        zone: pulumi.Input<string>;
    }>;
    maintenanceWindow: pulumi.Input<{
        day: pulumi.Input<number>;
        hour: pulumi.Input<number>;
        updateTrack: pulumi.Input<string>;
    }>;
    pricingPlan: pulumi.Input<string>;
    replicationType: pulumi.Input<string>;
    tier: pulumi.Input<string>;
    userLabels: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
    version: pulumi.Input<number>;
}>;

The settings to use for the database. The configuration is detailed below.

interface DatabaseState

Input properties used for looking up and filtering Database resources.

property charset

charset?: pulumi.Input<string>;

The charset value. See MySQL’s Supported Character Sets and Collations and Postgres’ Character Set Support for more details and supported values. Postgres databases are in beta and have limited charset support; they only support a value of UTF8 at creation time.

property collation

collation?: pulumi.Input<string>;

The collation value. See MySQL’s Supported Character Sets and Collations and Postgres’ Collation Support for more details and supported values. Postgres databases are in beta and have limited collation support; they only support a value of en_US.UTF8 at creation time.

property instance

instance?: pulumi.Input<string>;

The name of containing instance.

property name

name?: pulumi.Input<string>;

The name of the database.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

selfLink?: pulumi.Input<string>;

The URI of the created resource.

interface SslCertArgs

The set of arguments for constructing a SslCert resource.

property commonName

commonName: pulumi.Input<string>;

The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created.

property instance

instance: pulumi.Input<string>;

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

interface SslCertState

Input properties used for looking up and filtering SslCert resources.

property cert

cert?: pulumi.Input<string>;

The actual certificate data for this client certificate.

property certSerialNumber

certSerialNumber?: pulumi.Input<string>;

The serial number extracted from the certificate data.

property commonName

commonName?: pulumi.Input<string>;

The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created.

property createTime

createTime?: pulumi.Input<string>;

The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

property expirationTime

expirationTime?: pulumi.Input<string>;

The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

property instance

instance?: pulumi.Input<string>;

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

property privateKey

privateKey?: pulumi.Input<string>;

The private key associated with the client certificate.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

property serverCaCert

serverCaCert?: pulumi.Input<string>;

The CA cert of the server this client cert was generated from.

property sha1Fingerprint

sha1Fingerprint?: pulumi.Input<string>;

The SHA1 Fingerprint of the certificate.

interface UserArgs

The set of arguments for constructing a User resource.

property host

host?: pulumi.Input<string>;

The host the user can connect from. This is only supported for MySQL instances. Don’t set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created.

property instance

instance: pulumi.Input<string>;

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of the user. Changing this forces a new resource to be created.

property password

password?: pulumi.Input<string>;

The password for the user. Can be updated.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

interface UserState

Input properties used for looking up and filtering User resources.

property host

host?: pulumi.Input<string>;

The host the user can connect from. This is only supported for MySQL instances. Don’t set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created.

property instance

instance?: pulumi.Input<string>;

The name of the Cloud SQL instance. Changing this forces a new resource to be created.

property name

name?: pulumi.Input<string>;

The name of the user. Changing this forces a new resource to be created.

property password

password?: pulumi.Input<string>;

The password for the user. Can be updated.

property project

project?: pulumi.Input<string>;

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.