DatabaseInstance

Creates 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 * database_version (if applicable) * tier
Remove any fields that are not applicable to Second-generation instances: * settings.crash_safe_replication * settings.replication_type * settings.authorized_gae_applications And change values to appropriate values for Second-generation instances for: * activation_policy (“ON_DEMAND” is no longer an option) * pricing_plan (“PER_USE” is now the only valid option) Change settings.backup_configuration.enabled attribute 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 use gcp.sql.User to define a custom user with a restricted host and strong password.

Create a DatabaseInstance Resource

def DatabaseInstance(resource_name, opts=None, database_version=None, encryption_key_name=None, master_instance_name=None, name=None, project=None, region=None, replica_configuration=None, root_password=None, settings=None, __props__=None);
name string
The unique name of the resource.
args DatabaseInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatabaseInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DatabaseInstance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DatabaseInstance resource accepts the following input properties:

Settings DatabaseInstanceSettingsArgs

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

DatabaseVersion 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.

EncryptionKeyName 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.

MasterInstanceName 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.

Name string

A name for this whitelist entry.

Project string

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

Region 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.

ReplicaConfiguration DatabaseInstanceReplicaConfigurationArgs

The configuration for replication. The configuration is detailed below.

RootPassword string

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

Settings DatabaseInstanceSettings

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

DatabaseVersion 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.

EncryptionKeyName 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.

MasterInstanceName 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.

Name string

A name for this whitelist entry.

Project string

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

Region 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.

ReplicaConfiguration DatabaseInstanceReplicaConfiguration

The configuration for replication. The configuration is detailed below.

RootPassword string

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

settings DatabaseInstanceSettings

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

databaseVersion 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.

encryptionKeyName 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.

masterInstanceName 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.

name string

A name for this whitelist entry.

project string

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

region 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.

replicaConfiguration DatabaseInstanceReplicaConfiguration

The configuration for replication. The configuration is detailed below.

rootPassword string

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

settings Dict[DatabaseInstanceSettings]

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

database_version str

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.

encryption_key_name str

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.

master_instance_name str

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.

name str

A name for this whitelist entry.

project str

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

region str

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.

replica_configuration Dict[DatabaseInstanceReplicaConfiguration]

The configuration for replication. The configuration is detailed below.

root_password str

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

Outputs

All input properties are implicitly available as output properties. Additionally, the DatabaseInstance resource produces the following output properties:

ConnectionName string

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

FirstIpAddress string

The first IPv4 address of any type assigned.

Id string
The provider-assigned unique ID for this managed resource.
IpAddresses List<DatabaseInstanceIpAddress>
PrivateIpAddress string

The first private (PRIVATE) IPv4 address assigned.

PublicIpAddress string

The first public (PRIMARY) IPv4 address assigned.

SelfLink string

The URI of the created resource.

ServerCaCert DatabaseInstanceServerCaCert
ServiceAccountEmailAddress string

The service account email address assigned to the instance.

ConnectionName string

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

FirstIpAddress string

The first IPv4 address of any type assigned.

Id string
The provider-assigned unique ID for this managed resource.
IpAddresses []DatabaseInstanceIpAddress
PrivateIpAddress string

The first private (PRIVATE) IPv4 address assigned.

PublicIpAddress string

The first public (PRIMARY) IPv4 address assigned.

SelfLink string

The URI of the created resource.

ServerCaCert DatabaseInstanceServerCaCert
ServiceAccountEmailAddress string

The service account email address assigned to the instance.

connectionName string

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

firstIpAddress string

The first IPv4 address of any type assigned.

id string
The provider-assigned unique ID for this managed resource.
ipAddresses DatabaseInstanceIpAddress[]
privateIpAddress string

The first private (PRIVATE) IPv4 address assigned.

publicIpAddress string

The first public (PRIMARY) IPv4 address assigned.

selfLink string

The URI of the created resource.

serverCaCert DatabaseInstanceServerCaCert
serviceAccountEmailAddress string

The service account email address assigned to the instance.

connection_name str

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

first_ip_address str

The first IPv4 address of any type assigned.

id str
The provider-assigned unique ID for this managed resource.
ip_addresses List[DatabaseInstanceIpAddress]
private_ip_address str

The first private (PRIVATE) IPv4 address assigned.

public_ip_address str

The first public (PRIMARY) IPv4 address assigned.

self_link str

The URI of the created resource.

server_ca_cert Dict[DatabaseInstanceServerCaCert]
service_account_email_address str

The service account email address assigned to the instance.

Look up an Existing DatabaseInstance Resource

Get an existing DatabaseInstance 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?: DatabaseInstanceState, opts?: CustomResourceOptions): DatabaseInstance
static get(resource_name, id, opts=None, connection_name=None, database_version=None, encryption_key_name=None, first_ip_address=None, ip_addresses=None, master_instance_name=None, name=None, private_ip_address=None, project=None, public_ip_address=None, region=None, replica_configuration=None, root_password=None, self_link=None, server_ca_cert=None, service_account_email_address=None, settings=None, __props__=None);
func GetDatabaseInstance(ctx *Context, name string, id IDInput, state *DatabaseInstanceState, opts ...ResourceOption) (*DatabaseInstance, error)
public static DatabaseInstance Get(string name, Input<string> id, DatabaseInstanceState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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.

The following state arguments are supported:

ConnectionName string

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

DatabaseVersion 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.

EncryptionKeyName 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.

FirstIpAddress string

The first IPv4 address of any type assigned.

IpAddresses List<DatabaseInstanceIpAddressArgs>
MasterInstanceName 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.

Name string

A name for this whitelist entry.

PrivateIpAddress string

The first private (PRIVATE) IPv4 address assigned.

Project string

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

PublicIpAddress string

The first public (PRIMARY) IPv4 address assigned.

Region 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.

ReplicaConfiguration DatabaseInstanceReplicaConfigurationArgs

The configuration for replication. The configuration is detailed below.

RootPassword string

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

SelfLink string

The URI of the created resource.

ServerCaCert DatabaseInstanceServerCaCertArgs
ServiceAccountEmailAddress string

The service account email address assigned to the instance.

Settings DatabaseInstanceSettingsArgs

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

ConnectionName string

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

DatabaseVersion 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.

EncryptionKeyName 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.

FirstIpAddress string

The first IPv4 address of any type assigned.

IpAddresses []DatabaseInstanceIpAddress
MasterInstanceName 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.

Name string

A name for this whitelist entry.

PrivateIpAddress string

The first private (PRIVATE) IPv4 address assigned.

Project string

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

PublicIpAddress string

The first public (PRIMARY) IPv4 address assigned.

Region 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.

ReplicaConfiguration DatabaseInstanceReplicaConfiguration

The configuration for replication. The configuration is detailed below.

RootPassword string

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

SelfLink string

The URI of the created resource.

ServerCaCert DatabaseInstanceServerCaCert
ServiceAccountEmailAddress string

The service account email address assigned to the instance.

Settings DatabaseInstanceSettings

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

connectionName string

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

databaseVersion 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.

encryptionKeyName 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.

firstIpAddress string

The first IPv4 address of any type assigned.

ipAddresses DatabaseInstanceIpAddress[]
masterInstanceName 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.

name string

A name for this whitelist entry.

privateIpAddress string

The first private (PRIVATE) IPv4 address assigned.

project string

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

publicIpAddress string

The first public (PRIMARY) IPv4 address assigned.

region 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.

replicaConfiguration DatabaseInstanceReplicaConfiguration

The configuration for replication. The configuration is detailed below.

rootPassword string

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

selfLink string

The URI of the created resource.

serverCaCert DatabaseInstanceServerCaCert
serviceAccountEmailAddress string

The service account email address assigned to the instance.

settings DatabaseInstanceSettings

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

connection_name str

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

database_version str

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.

encryption_key_name str

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.

first_ip_address str

The first IPv4 address of any type assigned.

ip_addresses List[DatabaseInstanceIpAddress]
master_instance_name str

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.

name str

A name for this whitelist entry.

private_ip_address str

The first private (PRIVATE) IPv4 address assigned.

project str

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

public_ip_address str

The first public (PRIMARY) IPv4 address assigned.

region str

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.

replica_configuration Dict[DatabaseInstanceReplicaConfiguration]

The configuration for replication. The configuration is detailed below.

root_password str

Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

self_link str

The URI of the created resource.

server_ca_cert Dict[DatabaseInstanceServerCaCert]
service_account_email_address str

The service account email address assigned to the instance.

settings Dict[DatabaseInstanceSettings]

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

Supporting Types

DatabaseInstanceIpAddress

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

IpAddress string
TimeToRetire string
Type string
IpAddress string
TimeToRetire string
Type string
ipAddress string
timeToRetire string
type string
ip_address str
timeToRetire str
type str

DatabaseInstanceReplicaConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

CaCertificate string

PEM representation of the trusted CA’s x509 certificate.

ClientCertificate string

PEM representation of the slave’s x509 certificate.

ClientKey string

PEM representation of the slave’s private key. The corresponding public key in encoded in the client_certificate.

ConnectRetryInterval int

The number of seconds between connect retries.

DumpFilePath string

Path to a SQL file in GCS from which slave instances are created. Format is gs://bucket/filename.

FailoverTarget bool

Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

MasterHeartbeatPeriod int

Time in ms between replication heartbeats.

Password string

Password for the replication connection.

SslCipher string
Username string

Username for replication connection.

VerifyServerCertificate bool

True if the master’s common name value is checked during the SSL handshake.

CaCertificate string

PEM representation of the trusted CA’s x509 certificate.

ClientCertificate string

PEM representation of the slave’s x509 certificate.

ClientKey string

PEM representation of the slave’s private key. The corresponding public key in encoded in the client_certificate.

ConnectRetryInterval int

The number of seconds between connect retries.

DumpFilePath string

Path to a SQL file in GCS from which slave instances are created. Format is gs://bucket/filename.

FailoverTarget bool

Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

MasterHeartbeatPeriod int

Time in ms between replication heartbeats.

Password string

Password for the replication connection.

SslCipher string
Username string

Username for replication connection.

VerifyServerCertificate bool

True if the master’s common name value is checked during the SSL handshake.

caCertificate string

PEM representation of the trusted CA’s x509 certificate.

clientCertificate string

PEM representation of the slave’s x509 certificate.

clientKey string

PEM representation of the slave’s private key. The corresponding public key in encoded in the client_certificate.

connectRetryInterval number

The number of seconds between connect retries.

dumpFilePath string

Path to a SQL file in GCS from which slave instances are created. Format is gs://bucket/filename.

failoverTarget boolean

Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

masterHeartbeatPeriod number

Time in ms between replication heartbeats.

password string

Password for the replication connection.

sslCipher string
username string

Username for replication connection.

verifyServerCertificate boolean

True if the master’s common name value is checked during the SSL handshake.

caCertificate str

PEM representation of the trusted CA’s x509 certificate.

clientCertificate str

PEM representation of the slave’s x509 certificate.

clientKey str

PEM representation of the slave’s private key. The corresponding public key in encoded in the client_certificate.

connectRetryInterval float

The number of seconds between connect retries.

dumpFilePath str

Path to a SQL file in GCS from which slave instances are created. Format is gs://bucket/filename.

failoverTarget bool

Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance.

masterHeartbeatPeriod float

Time in ms between replication heartbeats.

password str

Password for the replication connection.

sslCipher str
username str

Username for replication connection.

verifyServerCertificate bool

True if the master’s common name value is checked during the SSL handshake.

DatabaseInstanceServerCaCert

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Cert string
CommonName string
CreateTime string
ExpirationTime string

The RFC 3339 formatted date time string indicating when this whitelist expires.

Sha1Fingerprint string
Cert string
CommonName string
CreateTime string
ExpirationTime string

The RFC 3339 formatted date time string indicating when this whitelist expires.

Sha1Fingerprint string
cert string
commonName string
createTime string
expirationTime string

The RFC 3339 formatted date time string indicating when this whitelist expires.

sha1Fingerprint string
cert str
common_name str
create_time str
expiration_time str

The RFC 3339 formatted date time string indicating when this whitelist expires.

sha1_fingerprint str

DatabaseInstanceSettings

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Tier string

The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types such as db-f1-micro, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.

ActivationPolicy string

This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.

AuthorizedGaeApplications List<string>

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. A list of Google App Engine (GAE) project names that are allowed to access this instance.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

AvailabilityType string

The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure that settings.backup_configuration.enabled and settings.backup_configuration.binary_log_enabled are both set to true.

BackupConfiguration DatabaseInstanceSettingsBackupConfigurationArgs
CrashSafeReplication bool

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Specific to read instances, indicates when crash-safe replication flags are enabled.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

DatabaseFlags List<DatabaseInstanceSettingsDatabaseFlagArgs>
DiskAutoresize bool

Configuration to increase storage size automatically. Note that future pulumi apply calls will attempt to resize the disk to the value specified in disk_size - if this is set, do not set disk_size.

DiskSize int

The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.

DiskType string

The type of data disk: PD_SSD or PD_HDD.

IpConfiguration DatabaseInstanceSettingsIpConfigurationArgs
LocationPreference DatabaseInstanceSettingsLocationPreferenceArgs
MaintenanceWindow DatabaseInstanceSettingsMaintenanceWindowArgs
PricingPlan string

Pricing plan for this instance, can only be PER_USE.

ReplicationType string

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Replication type for this instance, can be one of ASYNCHRONOUS or SYNCHRONOUS.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

UserLabels Dictionary<string, string>

A set of key/value user label pairs to assign to the instance.

Version int
Tier string

The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types such as db-f1-micro, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.

ActivationPolicy string

This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.

AuthorizedGaeApplications []string

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. A list of Google App Engine (GAE) project names that are allowed to access this instance.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

AvailabilityType string

The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure that settings.backup_configuration.enabled and settings.backup_configuration.binary_log_enabled are both set to true.

BackupConfiguration DatabaseInstanceSettingsBackupConfiguration
CrashSafeReplication bool

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Specific to read instances, indicates when crash-safe replication flags are enabled.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

DatabaseFlags []DatabaseInstanceSettingsDatabaseFlag
DiskAutoresize bool

Configuration to increase storage size automatically. Note that future pulumi apply calls will attempt to resize the disk to the value specified in disk_size - if this is set, do not set disk_size.

DiskSize int

The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.

DiskType string

The type of data disk: PD_SSD or PD_HDD.

IpConfiguration DatabaseInstanceSettingsIpConfiguration
LocationPreference DatabaseInstanceSettingsLocationPreference
MaintenanceWindow DatabaseInstanceSettingsMaintenanceWindow
PricingPlan string

Pricing plan for this instance, can only be PER_USE.

ReplicationType string

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Replication type for this instance, can be one of ASYNCHRONOUS or SYNCHRONOUS.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

UserLabels map[string]string

A set of key/value user label pairs to assign to the instance.

Version int
tier string

The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types such as db-f1-micro, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.

activationPolicy string

This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.

authorizedGaeApplications string[]

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. A list of Google App Engine (GAE) project names that are allowed to access this instance.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

availabilityType string

The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure that settings.backup_configuration.enabled and settings.backup_configuration.binary_log_enabled are both set to true.

backupConfiguration DatabaseInstanceSettingsBackupConfiguration
crashSafeReplication boolean

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Specific to read instances, indicates when crash-safe replication flags are enabled.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

databaseFlags DatabaseInstanceSettingsDatabaseFlag[]
diskAutoresize boolean

Configuration to increase storage size automatically. Note that future pulumi apply calls will attempt to resize the disk to the value specified in disk_size - if this is set, do not set disk_size.

diskSize number

The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.

diskType string

The type of data disk: PD_SSD or PD_HDD.

ipConfiguration DatabaseInstanceSettingsIpConfiguration
locationPreference DatabaseInstanceSettingsLocationPreference
maintenanceWindow DatabaseInstanceSettingsMaintenanceWindow
pricingPlan string

Pricing plan for this instance, can only be PER_USE.

replicationType string

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Replication type for this instance, can be one of ASYNCHRONOUS or SYNCHRONOUS.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

userLabels {[key: string]: string}

A set of key/value user label pairs to assign to the instance.

version number
tier str

The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types such as db-f1-micro, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.

activationPolicy str

This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND.

authorizedGaeApplications List[str]

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. A list of Google App Engine (GAE) project names that are allowed to access this instance.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

availabilityType str

The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure that settings.backup_configuration.enabled and settings.backup_configuration.binary_log_enabled are both set to true.

backupConfiguration Dict[DatabaseInstanceSettingsBackupConfiguration]
crashSafeReplication bool

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Specific to read instances, indicates when crash-safe replication flags are enabled.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

databaseFlags List[DatabaseInstanceSettingsDatabaseFlag]
diskAutoresize bool

Configuration to increase storage size automatically. Note that future pulumi apply calls will attempt to resize the disk to the value specified in disk_size - if this is set, do not set disk_size.

diskSize float

The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.

diskType str

The type of data disk: PD_SSD or PD_HDD.

ip_configuration Dict[DatabaseInstanceSettingsIpConfiguration]
locationPreference Dict[DatabaseInstanceSettingsLocationPreference]
maintenanceWindow Dict[DatabaseInstanceSettingsMaintenanceWindow]
pricingPlan str

Pricing plan for this instance, can only be PER_USE.

replicationType str

This property is only applicable to First Generation instances. First Generation instances are now deprecated, see here for information on how to upgrade to Second Generation instances. Replication type for this instance, can be one of ASYNCHRONOUS or SYNCHRONOUS.

Deprecated: This property is only applicable to First Generation instances, and First Generation instances are now deprecated.

user_labels Dict[str, str]

A set of key/value user label pairs to assign to the instance.

version float

DatabaseInstanceSettingsBackupConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

BinaryLogEnabled bool

True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Cannot be used with Postgres.

Enabled bool

True if backup configuration is enabled.

Location string
StartTime string

HH:MM format time indicating when backup configuration starts.

BinaryLogEnabled bool

True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Cannot be used with Postgres.

Enabled bool

True if backup configuration is enabled.

Location string
StartTime string

HH:MM format time indicating when backup configuration starts.

binaryLogEnabled boolean

True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Cannot be used with Postgres.

enabled boolean

True if backup configuration is enabled.

location string
startTime string

HH:MM format time indicating when backup configuration starts.

binaryLogEnabled bool

True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Cannot be used with Postgres.

enabled bool

True if backup configuration is enabled.

location str
startTime str

HH:MM format time indicating when backup configuration starts.

DatabaseInstanceSettingsDatabaseFlag

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

A name for this whitelist entry.

Value string

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

Name string

A name for this whitelist entry.

Value string

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

name string

A name for this whitelist entry.

value string

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

name str

A name for this whitelist entry.

value str

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

DatabaseInstanceSettingsIpConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AuthorizedNetworks List<DatabaseInstanceSettingsIpConfigurationAuthorizedNetworkArgs>
Ipv4Enabled bool

Whether this Cloud SQL instance should be assigned a public IPV4 address. Either ipv4_enabled must be enabled or a private_network must be configured.

PrivateNetwork string

The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. Either ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.

RequireSsl bool

True if mysqld should default to REQUIRE X509 for users connecting over IP.

AuthorizedNetworks []DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork
Ipv4Enabled bool

Whether this Cloud SQL instance should be assigned a public IPV4 address. Either ipv4_enabled must be enabled or a private_network must be configured.

PrivateNetwork string

The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. Either ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.

RequireSsl bool

True if mysqld should default to REQUIRE X509 for users connecting over IP.

authorizedNetworks DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork[]
ipv4Enabled boolean

Whether this Cloud SQL instance should be assigned a public IPV4 address. Either ipv4_enabled must be enabled or a private_network must be configured.

privateNetwork string

The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. Either ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.

requireSsl boolean

True if mysqld should default to REQUIRE X509 for users connecting over IP.

authorizedNetworks List[DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork]
ipv4Enabled bool

Whether this Cloud SQL instance should be assigned a public IPV4 address. Either ipv4_enabled must be enabled or a private_network must be configured.

privateNetwork str

The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. Either ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set.

requireSsl bool

True if mysqld should default to REQUIRE X509 for users connecting over IP.

DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Value string

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

ExpirationTime string

The RFC 3339 formatted date time string indicating when this whitelist expires.

Name string

A name for this whitelist entry.

Value string

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

ExpirationTime string

The RFC 3339 formatted date time string indicating when this whitelist expires.

Name string

A name for this whitelist entry.

value string

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

expirationTime string

The RFC 3339 formatted date time string indicating when this whitelist expires.

name string

A name for this whitelist entry.

value str

A CIDR notation IPv4 or IPv6 address that is allowed to access this instance. Must be set even if other two attributes are not for the whitelist to become active.

expiration_time str

The RFC 3339 formatted date time string indicating when this whitelist expires.

name str

A name for this whitelist entry.

DatabaseInstanceSettingsLocationPreference

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

FollowGaeApplication string

A GAE application whose zone to remain in. Must be in the same region as this instance.

Zone string

The preferred compute engine zone.

FollowGaeApplication string

A GAE application whose zone to remain in. Must be in the same region as this instance.

Zone string

The preferred compute engine zone.

followGaeApplication string

A GAE application whose zone to remain in. Must be in the same region as this instance.

zone string

The preferred compute engine zone.

followGaeApplication str

A GAE application whose zone to remain in. Must be in the same region as this instance.

zone str

The preferred compute engine zone.

DatabaseInstanceSettingsMaintenanceWindow

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Day int

Day of week (1-7), starting on Monday

Hour int

Hour of day (0-23), ignored if day not set

UpdateTrack string

Receive updates earlier (canary) or later (stable)

Day int

Day of week (1-7), starting on Monday

Hour int

Hour of day (0-23), ignored if day not set

UpdateTrack string

Receive updates earlier (canary) or later (stable)

day number

Day of week (1-7), starting on Monday

hour number

Hour of day (0-23), ignored if day not set

updateTrack string

Receive updates earlier (canary) or later (stable)

day float

Day of week (1-7), starting on Monday

hour float

Hour of day (0-23), ignored if day not set

updateTrack str

Receive updates earlier (canary) or later (stable)

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.