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_applicationsAnd 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) 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.
Create a DatabaseInstance Resource
new DatabaseInstance(name: string, args: DatabaseInstanceArgs, opts?: CustomResourceOptions);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);func NewDatabaseInstance(ctx *Context, name string, args DatabaseInstanceArgs, opts ...ResourceOption) (*DatabaseInstance, error)public DatabaseInstance(string name, DatabaseInstanceArgs args, CustomResourceOptions? opts = null)- 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
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below.
- Database
Version 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.- Encryption
Key stringName 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/Decrypterrole on your key - please see this step.- Master
Instance stringName The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, 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
regionargument for this resource, make sure you understand this.- Replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below.
- Root
Password string Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
- Settings
Database
Instance Settings The settings to use for the database. The configuration is detailed below.
- Database
Version 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.- Encryption
Key stringName 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/Decrypterrole on your key - please see this step.- Master
Instance stringName The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, 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
regionargument for this resource, make sure you understand this.- Replica
Configuration DatabaseInstance Replica Configuration The configuration for replication. The configuration is detailed below.
- Root
Password string Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
- settings
Database
Instance Settings The settings to use for the database. The configuration is detailed below.
- database
Version 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.- encryption
Key stringName 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/Decrypterrole on your key - please see this step.- master
Instance stringName The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, 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
regionargument for this resource, make sure you understand this.- replica
Configuration DatabaseInstance Replica Configuration The configuration for replication. The configuration is detailed below.
- root
Password string Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
- settings
Dict[Database
Instance Settings] 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_ strname 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/Decrypterrole on your key - please see this step.- master_
instance_ strname The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, 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
regionargument for this resource, make sure you understand this.- replica_
configuration Dict[DatabaseInstance Replica Configuration] 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:
- Connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- First
Ip stringAddress The first IPv4 address of any type assigned.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Addresses List<DatabaseInstance Ip Address> - Private
Ip stringAddress The first private (
PRIVATE) IPv4 address assigned.- Public
Ip stringAddress The first public (
PRIMARY) IPv4 address assigned.- Self
Link string The URI of the created resource.
- Server
Ca DatabaseCert Instance Server Ca Cert - Service
Account stringEmail Address The service account email address assigned to the instance.
- Connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- First
Ip stringAddress The first IPv4 address of any type assigned.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Addresses []DatabaseInstance Ip Address - Private
Ip stringAddress The first private (
PRIVATE) IPv4 address assigned.- Public
Ip stringAddress The first public (
PRIMARY) IPv4 address assigned.- Self
Link string The URI of the created resource.
- Server
Ca DatabaseCert Instance Server Ca Cert - Service
Account stringEmail Address The service account email address assigned to the instance.
- connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- first
Ip stringAddress The first IPv4 address of any type assigned.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Addresses DatabaseInstance Ip Address[] - private
Ip stringAddress The first private (
PRIVATE) IPv4 address assigned.- public
Ip stringAddress The first public (
PRIMARY) IPv4 address assigned.- self
Link string The URI of the created resource.
- server
Ca DatabaseCert Instance Server Ca Cert - service
Account stringEmail Address 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_ straddress The first IPv4 address of any type assigned.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
addresses List[DatabaseInstance Ip Address] - private_
ip_ straddress The first private (
PRIVATE) IPv4 address assigned.- public_
ip_ straddress The first public (
PRIMARY) IPv4 address assigned.- self_
link str The URI of the created resource.
- server_
ca_ Dict[Databasecert Instance Server Ca Cert] - service_
account_ stremail_ address 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): DatabaseInstancestatic 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:
- Connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- Database
Version 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.- Encryption
Key stringName 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/Decrypterrole on your key - please see this step.- First
Ip stringAddress The first IPv4 address of any type assigned.
- Ip
Addresses List<DatabaseInstance Ip Address Args> - Master
Instance stringName The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, as well as existing backups.- Name string
A name for this whitelist entry.
- Private
Ip stringAddress 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.
- Public
Ip stringAddress 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
regionargument for this resource, make sure you understand this.- Replica
Configuration DatabaseInstance Replica Configuration Args The configuration for replication. The configuration is detailed below.
- Root
Password string Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
- Self
Link string The URI of the created resource.
- Server
Ca DatabaseCert Instance Server Ca Cert Args - Service
Account stringEmail Address The service account email address assigned to the instance.
- Settings
Database
Instance Settings Args The settings to use for the database. The configuration is detailed below.
- Connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- Database
Version 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.- Encryption
Key stringName 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/Decrypterrole on your key - please see this step.- First
Ip stringAddress The first IPv4 address of any type assigned.
- Ip
Addresses []DatabaseInstance Ip Address - Master
Instance stringName The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, as well as existing backups.- Name string
A name for this whitelist entry.
- Private
Ip stringAddress 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.
- Public
Ip stringAddress 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
regionargument for this resource, make sure you understand this.- Replica
Configuration DatabaseInstance Replica Configuration The configuration for replication. The configuration is detailed below.
- Root
Password string Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
- Self
Link string The URI of the created resource.
- Server
Ca DatabaseCert Instance Server Ca Cert - Service
Account stringEmail Address The service account email address assigned to the instance.
- Settings
Database
Instance Settings The settings to use for the database. The configuration is detailed below.
- connection
Name string The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy.
- database
Version 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.- encryption
Key stringName 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/Decrypterrole on your key - please see this step.- first
Ip stringAddress The first IPv4 address of any type assigned.
- ip
Addresses DatabaseInstance Ip Address[] - master
Instance stringName The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, as well as existing backups.- name string
A name for this whitelist entry.
- private
Ip stringAddress 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.
- public
Ip stringAddress 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
regionargument for this resource, make sure you understand this.- replica
Configuration DatabaseInstance Replica Configuration The configuration for replication. The configuration is detailed below.
- root
Password string Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.
- self
Link string The URI of the created resource.
- server
Ca DatabaseCert Instance Server Ca Cert - service
Account stringEmail Address The service account email address assigned to the instance.
- settings
Database
Instance Settings 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_ strname 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/Decrypterrole on your key - please see this step.- first_
ip_ straddress The first IPv4 address of any type assigned.
- ip_
addresses List[DatabaseInstance Ip Address] - master_
instance_ strname The name of the instance that will act as the master in the replication setup. Note, this requires the master to have
binary_log_enabledset, as well as existing backups.- name str
A name for this whitelist entry.
- private_
ip_ straddress 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_ straddress 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
regionargument for this resource, make sure you understand this.- replica_
configuration Dict[DatabaseInstance Replica Configuration] 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_ Dict[Databasecert Instance Server Ca Cert] - service_
account_ stremail_ address The service account email address assigned to the instance.
- settings
Dict[Database
Instance Settings] 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.
DatabaseInstanceReplicaConfiguration
- Ca
Certificate string PEM representation of the trusted CA’s x509 certificate.
- Client
Certificate string PEM representation of the slave’s x509 certificate.
- Client
Key string PEM representation of the slave’s private key. The corresponding public key in encoded in the
client_certificate.- Connect
Retry intInterval The number of seconds between connect retries.
- Dump
File stringPath Path to a SQL file in GCS from which slave instances are created. Format is
gs://bucket/filename.- Failover
Target 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.
- Master
Heartbeat intPeriod Time in ms between replication heartbeats.
- Password string
Password for the replication connection.
- Ssl
Cipher string - Username string
Username for replication connection.
- Verify
Server boolCertificate True if the master’s common name value is checked during the SSL handshake.
- Ca
Certificate string PEM representation of the trusted CA’s x509 certificate.
- Client
Certificate string PEM representation of the slave’s x509 certificate.
- Client
Key string PEM representation of the slave’s private key. The corresponding public key in encoded in the
client_certificate.- Connect
Retry intInterval The number of seconds between connect retries.
- Dump
File stringPath Path to a SQL file in GCS from which slave instances are created. Format is
gs://bucket/filename.- Failover
Target 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.
- Master
Heartbeat intPeriod Time in ms between replication heartbeats.
- Password string
Password for the replication connection.
- Ssl
Cipher string - Username string
Username for replication connection.
- Verify
Server boolCertificate True if the master’s common name value is checked during the SSL handshake.
- ca
Certificate string PEM representation of the trusted CA’s x509 certificate.
- client
Certificate string PEM representation of the slave’s x509 certificate.
- client
Key string PEM representation of the slave’s private key. The corresponding public key in encoded in the
client_certificate.- connect
Retry numberInterval The number of seconds between connect retries.
- dump
File stringPath Path to a SQL file in GCS from which slave instances are created. Format is
gs://bucket/filename.- failover
Target 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.
- master
Heartbeat numberPeriod Time in ms between replication heartbeats.
- password string
Password for the replication connection.
- ssl
Cipher string - username string
Username for replication connection.
- verify
Server booleanCertificate True if the master’s common name value is checked during the SSL handshake.
- ca
Certificate str PEM representation of the trusted CA’s x509 certificate.
- client
Certificate str PEM representation of the slave’s x509 certificate.
- client
Key str PEM representation of the slave’s private key. The corresponding public key in encoded in the
client_certificate.- connect
Retry floatInterval The number of seconds between connect retries.
- dump
File strPath Path to a SQL file in GCS from which slave instances are created. Format is
gs://bucket/filename.- failover
Target 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.
- master
Heartbeat floatPeriod Time in ms between replication heartbeats.
- password str
Password for the replication connection.
- ssl
Cipher str - username str
Username for replication connection.
- verify
Server boolCertificate 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
- Common
Name string - Create
Time string - Expiration
Time string The RFC 3339 formatted date time string indicating when this whitelist expires.
- Sha1Fingerprint string
- Cert string
- Common
Name string - Create
Time string - Expiration
Time string The RFC 3339 formatted date time string indicating when this whitelist expires.
- Sha1Fingerprint string
- cert string
- common
Name string - create
Time string - expiration
Time 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
- 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 asdb-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.- Activation
Policy string This specifies when the instance should be active. Can be either
ALWAYS,NEVERorON_DEMAND.- 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.
- Availability
Type string The availability type of the Cloud SQL instance, high availability (
REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure thatsettings.backup_configuration.enabledandsettings.backup_configuration.binary_log_enabledare both set totrue.- Backup
Configuration DatabaseInstance Settings Backup Configuration Args - Crash
Safe boolReplication 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.
- Database
Flags List<DatabaseInstance Settings Database Flag Args> - Disk
Autoresize bool Configuration to increase storage size automatically. Note that future
pulumi applycalls will attempt to resize the disk to the value specified indisk_size- if this is set, do not setdisk_size.- Disk
Size int The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.
- Disk
Type string The type of data disk: PD_SSD or PD_HDD.
- Ip
Configuration DatabaseInstance Settings Ip Configuration Args - Location
Preference DatabaseInstance Settings Location Preference Args - Maintenance
Window DatabaseInstance Settings Maintenance Window Args - Pricing
Plan string Pricing plan for this instance, can only be
PER_USE.- Replication
Type 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
ASYNCHRONOUSorSYNCHRONOUS.- User
Labels 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 asdb-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.- Activation
Policy string This specifies when the instance should be active. Can be either
ALWAYS,NEVERorON_DEMAND.- []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.
- Availability
Type string The availability type of the Cloud SQL instance, high availability (
REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure thatsettings.backup_configuration.enabledandsettings.backup_configuration.binary_log_enabledare both set totrue.- Backup
Configuration DatabaseInstance Settings Backup Configuration - Crash
Safe boolReplication 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.
- Database
Flags []DatabaseInstance Settings Database Flag - Disk
Autoresize bool Configuration to increase storage size automatically. Note that future
pulumi applycalls will attempt to resize the disk to the value specified indisk_size- if this is set, do not setdisk_size.- Disk
Size int The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.
- Disk
Type string The type of data disk: PD_SSD or PD_HDD.
- Ip
Configuration DatabaseInstance Settings Ip Configuration - Location
Preference DatabaseInstance Settings Location Preference - Maintenance
Window DatabaseInstance Settings Maintenance Window - Pricing
Plan string Pricing plan for this instance, can only be
PER_USE.- Replication
Type 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
ASYNCHRONOUSorSYNCHRONOUS.- User
Labels 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 asdb-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.- activation
Policy string This specifies when the instance should be active. Can be either
ALWAYS,NEVERorON_DEMAND.- 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.
- availability
Type string The availability type of the Cloud SQL instance, high availability (
REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure thatsettings.backup_configuration.enabledandsettings.backup_configuration.binary_log_enabledare both set totrue.- backup
Configuration DatabaseInstance Settings Backup Configuration - crash
Safe booleanReplication 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.
- database
Flags DatabaseInstance Settings Database Flag[] - disk
Autoresize boolean Configuration to increase storage size automatically. Note that future
pulumi applycalls will attempt to resize the disk to the value specified indisk_size- if this is set, do not setdisk_size.- disk
Size number The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.
- disk
Type string The type of data disk: PD_SSD or PD_HDD.
- ip
Configuration DatabaseInstance Settings Ip Configuration - location
Preference DatabaseInstance Settings Location Preference - maintenance
Window DatabaseInstance Settings Maintenance Window - pricing
Plan string Pricing plan for this instance, can only be
PER_USE.- replication
Type 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
ASYNCHRONOUSorSYNCHRONOUS.- user
Labels {[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 asdb-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types.- activation
Policy str This specifies when the instance should be active. Can be either
ALWAYS,NEVERorON_DEMAND.- 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.
- availability
Type str The availability type of the Cloud SQL instance, high availability (
REGIONAL) or single zone (ZONAL).’ For MySQL instances, ensure thatsettings.backup_configuration.enabledandsettings.backup_configuration.binary_log_enabledare both set totrue.- backup
Configuration Dict[DatabaseInstance Settings Backup Configuration] - crash
Safe boolReplication 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.
- database
Flags List[DatabaseInstance Settings Database Flag] - disk
Autoresize bool Configuration to increase storage size automatically. Note that future
pulumi applycalls will attempt to resize the disk to the value specified indisk_size- if this is set, do not setdisk_size.- disk
Size float The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased.
- disk
Type str The type of data disk: PD_SSD or PD_HDD.
- ip_
configuration Dict[DatabaseInstance Settings Ip Configuration] - location
Preference Dict[DatabaseInstance Settings Location Preference] - maintenance
Window Dict[DatabaseInstance Settings Maintenance Window] - pricing
Plan str Pricing plan for this instance, can only be
PER_USE.- replication
Type 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
ASYNCHRONOUSorSYNCHRONOUS.- user_
labels Dict[str, str] A set of key/value user label pairs to assign to the instance.
- version float
DatabaseInstanceSettingsBackupConfiguration
- Binary
Log boolEnabled True if binary logging is enabled. If
settings.backup_configuration.enabledis false, this must be as well. Cannot be used with Postgres.- Enabled bool
True if backup configuration is enabled.
- Location string
- Start
Time string HH:MMformat time indicating when backup configuration starts.
- Binary
Log boolEnabled True if binary logging is enabled. If
settings.backup_configuration.enabledis false, this must be as well. Cannot be used with Postgres.- Enabled bool
True if backup configuration is enabled.
- Location string
- Start
Time string HH:MMformat time indicating when backup configuration starts.
- binary
Log booleanEnabled True if binary logging is enabled. If
settings.backup_configuration.enabledis false, this must be as well. Cannot be used with Postgres.- enabled boolean
True if backup configuration is enabled.
- location string
- start
Time string HH:MMformat time indicating when backup configuration starts.
DatabaseInstanceSettingsDatabaseFlag
DatabaseInstanceSettingsIpConfiguration
-
List<Database
Instance Settings Ip Configuration Authorized Network Args> - Ipv4Enabled bool
Whether this Cloud SQL instance should be assigned a public IPV4 address. Either
ipv4_enabledmust be enabled or aprivate_networkmust be configured.- Private
Network 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.- Require
Ssl bool True if mysqld should default to
REQUIRE X509for users connecting over IP.
-
[]Database
Instance Settings Ip Configuration Authorized Network - Ipv4Enabled bool
Whether this Cloud SQL instance should be assigned a public IPV4 address. Either
ipv4_enabledmust be enabled or aprivate_networkmust be configured.- Private
Network 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.- Require
Ssl bool True if mysqld should default to
REQUIRE X509for users connecting over IP.
-
Database
Instance Settings Ip Configuration Authorized Network[] - ipv4Enabled boolean
Whether this Cloud SQL instance should be assigned a public IPV4 address. Either
ipv4_enabledmust be enabled or aprivate_networkmust be configured.- private
Network 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.- require
Ssl boolean True if mysqld should default to
REQUIRE X509for users connecting over IP.
-
List[Database
Instance Settings Ip Configuration Authorized Network] - ipv4Enabled bool
Whether this Cloud SQL instance should be assigned a public IPV4 address. Either
ipv4_enabledmust be enabled or aprivate_networkmust be configured.- private
Network 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_enabledmust be enabled or aprivate_networkmust be configured. This setting can be updated, but it cannot be removed after it is set.- require
Ssl bool True if mysqld should default to
REQUIRE X509for users connecting over IP.
DatabaseInstanceSettingsIpConfigurationAuthorizedNetwork
- 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.
- Expiration
Time 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.
- Expiration
Time 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.
- expiration
Time 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
- Follow
Gae stringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- Zone string
The preferred compute engine zone.
- Follow
Gae stringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- Zone string
The preferred compute engine zone.
- follow
Gae stringApplication A GAE application whose zone to remain in. Must be in the same region as this instance.
- zone string
The preferred compute engine zone.
- follow
Gae strApplication 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
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.