Module sql
This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.
Resources
Functions
Others
- DatabaseArgs
- DatabaseInstanceArgs
- DatabaseInstanceState
- DatabaseState
- GetCaCertsArgs
- GetCaCertsResult
- SourceRepresentationInstanceArgs
- SourceRepresentationInstanceState
- SslCertArgs
- SslCertState
- UserArgs
- UserState
Resources
Resource Database
class Database extends CustomResourceRepresents a SQL database inside the Cloud SQL instance, hosted in Google’s cloud.
Example Usage - Sql Database Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const instance = new gcp.sql.DatabaseInstance("instance", {
region: "us-central1",
settings: {
tier: "db-f1-micro",
},
});
const database = new gcp.sql.Database("database", {instance: instance.name});constructor
new Database(name: string, args: DatabaseArgs, opts?: pulumi.CustomResourceOptions)Create a Database resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): DatabaseGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is DatabaseReturns true if the given object is an instance of Database. 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 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 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 the Cloud SQL instance. This does not include the project ID.
property name
public name: pulumi.Output<string>;The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
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 selfLink
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.
Resource DatabaseInstance
class DatabaseInstance extends CustomResourceCreates a new Google SQL Database Instance. For more information, see the official documentation, or the JSON API.
NOTE on
gcp.sql.DatabaseInstance: - First-generation instances have been deprecated and should no longer be created, see upgrade docs for more details. To upgrade your First-generation instance, update your config that the instance has *settings.ip_configuration.ipv4_enabled=true*settings.backup_configuration.enabled=true*settings.backup_configuration.binary_log_enabled=true. Apply the config, then upgrade the instance in the console as described in the documentation. Once upgraded, update the following attributes in your config to the correct value according to the above documentation: *region*databaseVersion(if applicable) *tierRemove any fields that are not applicable to Second-generation instances: *settings.crash_safe_replication*settings.replication_type*settings.authorized_gae_applicationsAnd change values to appropriate values for Second-generation instances for: *activationPolicy(“ON_DEMAND” is no longer an option) *pricingPlan(“PER_USE” is now the only valid option) Changesettings.backup_configuration.enabledattribute back to its desired value and apply as necessary.NOTE on
gcp.sql.DatabaseInstance: - Second-generation instances include a default ‘root’@‘%’ user with no password. This user will be deleted by the provider on instance creation. You should usegcp.sql.Userto define a custom user with a restricted host and strong password.
Example Usage
SQL Second Generation Instance
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const master = new gcp.sql.DatabaseInstance("master", {
databaseVersion: "POSTGRES_11",
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
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as random from "@pulumi/random";
const privateNetwork = new gcp.compute.Network("privateNetwork", {});
const privateIpAddress = new gcp.compute.GlobalAddress("privateIpAddress", {
purpose: "VPC_PEERING",
addressType: "INTERNAL",
prefixLength: 16,
network: privateNetwork.id,
});
const privateVpcConnection = new gcp.servicenetworking.Connection("privateVpcConnection", {
network: privateNetwork.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAddress.name],
});
const dbNameSuffix = new random.RandomId("dbNameSuffix", {byteLength: 4});
const instance = new gcp.sql.DatabaseInstance("instance", {
region: "us-central1",
settings: {
tier: "db-f1-micro",
ip_configuration: {
ipv4Enabled: false,
privateNetwork: privateNetwork.id,
},
},
});constructor
new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: pulumi.CustomResourceOptions)Create a DatabaseInstance resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): DatabaseInstanceGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is DatabaseInstanceReturns true if the given object is an instance of DatabaseInstance. 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, PostgreSQL or
SQL Server (beta) version to use. Supported values include MYSQL_5_6,
MYSQL_5_7, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, SQLSERVER_2017_STANDARD,
SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB.
Database Version Policies
includes an up-to-date reference of supported versions.
property encryptionKeyName
public encryptionKeyName: pulumi.Output<string>;The full path to the encryption key used for the CMEK disk encryption. Setting
up disk encryption currently requires manual steps outside of this provider.
The provided key must be in the same region as the SQL instance. In order
to use this feature, a special kind of service account must be created and
granted permission on this key. This step can currently only be done
manually, please see this step.
That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your
key - please see this step.
property firstIpAddress
public firstIpAddress: pulumi.Output<string>;The first IPv4 address of any type assigned.
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<DatabaseInstanceIpAddress[]>;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
binaryLogEnabled set, as well as existing backups.
property name
public name: pulumi.Output<string>;A name for this whitelist entry.
property privateIpAddress
public privateIpAddress: pulumi.Output<string>;The first private (PRIVATE) IPv4 address assigned.
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.
property region
public region: pulumi.Output<string>;The region the instance will sit in. Note, 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 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<DatabaseInstanceReplicaConfiguration>;The configuration for replication. The configuration is detailed below.
property rootPassword
public rootPassword: pulumi.Output<string | undefined>;Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
property selfLink
public selfLink: pulumi.Output<string>;The URI of the created resource.
property serverCaCert
public serverCaCert: pulumi.Output<DatabaseInstanceServerCaCert>;property serviceAccountEmailAddress
public serviceAccountEmailAddress: pulumi.Output<string>;The service account email address assigned to the instance.
property settings
public settings: pulumi.Output<DatabaseInstanceSettings>;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.
Resource SourceRepresentationInstance
class SourceRepresentationInstance extends CustomResourceA 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", {
databaseVersion: "MYSQL_5_7",
host: "10.20.30.40",
port: 3306,
region: "us-central1",
});constructor
new SourceRepresentationInstance(name: string, args: SourceRepresentationInstanceArgs, opts?: pulumi.CustomResourceOptions)Create a SourceRepresentationInstance resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SourceRepresentationInstanceState, opts?: pulumi.CustomResourceOptions): SourceRepresentationInstanceGet an existing SourceRepresentationInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is SourceRepresentationInstanceReturns 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.
property databaseVersion
public databaseVersion: pulumi.Output<string>;The MySQL version running on your source database server.
property host
public host: pulumi.Output<string>;The externally accessible IPv4 address for the source database server.
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 name
public name: pulumi.Output<string>;The name of the source representation instance. Use any valid Cloud SQL instance name.
property port
public port: pulumi.Output<number | undefined>;The externally accessible port for the source database server. Defaults to 3306.
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 region
public region: pulumi.Output<string>;The Region in which the created instance should reside. If it is not provided, the provider region is used.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource SslCert
class SslCert extends CustomResourceCreates a new Google SQL SSL Cert on a Google SQL Instance. For more information, see the official documentation, or the JSON API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as random from "@pulumi/random";
const dbNameSuffix = new random.RandomId("dbNameSuffix", {byteLength: 4});
const master = new gcp.sql.DatabaseInstance("master", {settings: {
tier: "db-f1-micro",
}});
const clientCert = new gcp.sql.SslCert("clientCert", {
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.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): SslCertGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is SslCertReturns true if the given object is an instance of SslCert. 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.
Resource User
class User extends CustomResourceCreates a new Google SQL User on a Google SQL User Instance. For more information, see the official documentation, or the JSON API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as random from "@pulumi/random";
const dbNameSuffix = new random.RandomId("dbNameSuffix", {byteLength: 4});
const master = new gcp.sql.DatabaseInstance("master", {settings: {
tier: "db-f1-micro",
}});
const users = new gcp.sql.User("users", {
instance: master.name,
host: "me.com",
password: "changeme",
});constructor
new User(name: string, args: UserArgs, opts?: pulumi.CustomResourceOptions)Create a User resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): UserGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is UserReturns true if the given object is an instance of User. 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. For Postgres instances this is a Required field.
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.
Functions
Function getCaCerts
getCaCerts(args: GetCaCertsArgs, opts?: pulumi.InvokeOptions): Promise<GetCaCertsResult>Get all of the trusted Certificate Authorities (CAs) for the specified SQL database instance. For more information see the official documentation and API.
Others
interface DatabaseArgs
interface DatabaseArgsThe 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 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 only support
a value of en_US.UTF8 at creation time.
property instance
instance: pulumi.Input<string>;The name of the Cloud SQL instance. This does not include the project ID.
property name
name?: pulumi.Input<string>;The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
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
interface DatabaseInstanceArgsThe set of arguments for constructing a DatabaseInstance resource.
property databaseVersion
databaseVersion?: pulumi.Input<string>;The MySQL, PostgreSQL or
SQL Server (beta) version to use. Supported values include MYSQL_5_6,
MYSQL_5_7, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, SQLSERVER_2017_STANDARD,
SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB.
Database Version Policies
includes an up-to-date reference of supported versions.
property encryptionKeyName
encryptionKeyName?: pulumi.Input<string>;The full path to the encryption key used for the CMEK disk encryption. Setting
up disk encryption currently requires manual steps outside of this provider.
The provided key must be in the same region as the SQL instance. In order
to use this feature, a special kind of service account must be created and
granted permission on this key. This step can currently only be done
manually, please see this step.
That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your
key - please see this step.
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
binaryLogEnabled set, as well as existing backups.
property name
name?: pulumi.Input<string>;A name for this whitelist entry.
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, 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 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<DatabaseInstanceReplicaConfiguration>;The configuration for replication. The configuration is detailed below.
property rootPassword
rootPassword?: pulumi.Input<string>;Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
property settings
settings: pulumi.Input<DatabaseInstanceSettings>;The settings to use for the database. The configuration is detailed below.
interface DatabaseInstanceState
interface DatabaseInstanceStateInput 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, PostgreSQL or
SQL Server (beta) version to use. Supported values include MYSQL_5_6,
MYSQL_5_7, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, POSTGRES_12, SQLSERVER_2017_STANDARD,
SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB.
Database Version Policies
includes an up-to-date reference of supported versions.
property encryptionKeyName
encryptionKeyName?: pulumi.Input<string>;The full path to the encryption key used for the CMEK disk encryption. Setting
up disk encryption currently requires manual steps outside of this provider.
The provided key must be in the same region as the SQL instance. In order
to use this feature, a special kind of service account must be created and
granted permission on this key. This step can currently only be done
manually, please see this step.
That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your
key - please see this step.
property firstIpAddress
firstIpAddress?: pulumi.Input<string>;The first IPv4 address of any type assigned.
property ipAddresses
ipAddresses?: pulumi.Input<pulumi.Input<DatabaseInstanceIpAddress>[]>;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
binaryLogEnabled set, as well as existing backups.
property name
name?: pulumi.Input<string>;A name for this whitelist entry.
property privateIpAddress
privateIpAddress?: pulumi.Input<string>;The first private (PRIVATE) IPv4 address assigned.
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.
property region
region?: pulumi.Input<string>;The region the instance will sit in. Note, 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 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<DatabaseInstanceReplicaConfiguration>;The configuration for replication. The configuration is detailed below.
property rootPassword
rootPassword?: pulumi.Input<string>;Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
property selfLink
selfLink?: pulumi.Input<string>;The URI of the created resource.
property serverCaCert
serverCaCert?: pulumi.Input<DatabaseInstanceServerCaCert>;property serviceAccountEmailAddress
serviceAccountEmailAddress?: pulumi.Input<string>;The service account email address assigned to the instance.
property settings
settings?: pulumi.Input<DatabaseInstanceSettings>;The settings to use for the database. The configuration is detailed below.
interface DatabaseState
interface DatabaseStateInput 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 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 only support
a value of en_US.UTF8 at creation time.
property instance
instance?: pulumi.Input<string>;The name of the Cloud SQL instance. This does not include the project ID.
property name
name?: pulumi.Input<string>;The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.
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 selfLink
selfLink?: pulumi.Input<string>;The URI of the created resource.
interface GetCaCertsArgs
interface GetCaCertsArgsA collection of arguments for invoking getCaCerts.
property instance
instance: string;The name or self link of the instance.
property project
project?: undefined | string;The ID of the project in which the resource belongs. If project is not provided, the provider project is used.
interface GetCaCertsResult
interface GetCaCertsResultA collection of values returned by getCaCerts.
property activeVersion
activeVersion: string;SHA1 fingerprint of the currently active CA certificate.
property certs
certs: GetCaCertsCert[];A list of server CA certificates for the instance. Each contains:
property id
id: string;The provider-assigned unique ID for this managed resource.
property instance
instance: string;property project
project: string;interface SourceRepresentationInstanceArgs
interface SourceRepresentationInstanceArgsThe set of arguments for constructing a SourceRepresentationInstance resource.
property databaseVersion
databaseVersion: pulumi.Input<string>;The MySQL version running on your source database server.
property host
host: pulumi.Input<string>;The externally accessible IPv4 address for the source database server.
property name
name?: pulumi.Input<string>;The name of the source representation instance. Use any valid Cloud SQL instance name.
property port
port?: pulumi.Input<number>;The externally accessible port for the source database server. Defaults to 3306.
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 in which the created instance should reside. If it is not provided, the provider region is used.
interface SourceRepresentationInstanceState
interface SourceRepresentationInstanceStateInput properties used for looking up and filtering SourceRepresentationInstance resources.
property databaseVersion
databaseVersion?: pulumi.Input<string>;The MySQL version running on your source database server.
property host
host?: pulumi.Input<string>;The externally accessible IPv4 address for the source database server.
property name
name?: pulumi.Input<string>;The name of the source representation instance. Use any valid Cloud SQL instance name.
property port
port?: pulumi.Input<number>;The externally accessible port for the source database server. Defaults to 3306.
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 in which the created instance should reside. If it is not provided, the provider region is used.
interface SslCertArgs
interface SslCertArgsThe 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
interface SslCertStateInput 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
interface UserArgsThe 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. For Postgres instances this is a Required field.
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
interface UserStateInput 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. For Postgres instances this is a Required field.
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.