DatabaseInstanceSettings class
Constructors
-
DatabaseInstanceSettings({Input<String?>? activationPolicy, Input<DatabaseInstanceSettingsActiveDirectoryConfig?>? activeDirectoryConfig, Input<DatabaseInstanceSettingsAdvancedMachineFeatures?>? advancedMachineFeatures, Input<bool?>? autoUpgradeEnabled, Input<String?>? availabilityType, Input<DatabaseInstanceSettingsBackupConfiguration?>? backupConfiguration, Input<String?>? collation, Input<List<DatabaseInstanceSettingsConnectionPoolConfig>?>? connectionPoolConfigs, Input<String?>? connectorEnforcement, Input<String?>? dataApiAccess, Input<DatabaseInstanceSettingsDataCacheConfig?>? dataCacheConfig, Input<int?>? dataDiskProvisionedIops, Input<int?>? dataDiskProvisionedThroughput, Input<List<DatabaseInstanceSettingsDatabaseFlag>?>? databaseFlags, Input<bool?>? deletionProtectionEnabled, Input<DatabaseInstanceSettingsDenyMaintenancePeriod?>? denyMaintenancePeriod, Input<bool?>? diskAutoresize, Input<int?>? diskAutoresizeLimit, Input<int?>? diskSize, Input<String?>? diskType, Input<String?>? edition, Input<String?>? effectiveAvailabilityType, Input<bool?>? enableDataplexIntegration, Input<bool?>? enableGoogleMlIntegration, Input<DatabaseInstanceSettingsEntraidConfig?>? entraidConfig, Input<DatabaseInstanceSettingsFinalBackupConfig?>? finalBackupConfig, Input<DatabaseInstanceSettingsInsightsConfig?>? insightsConfig, Input<DatabaseInstanceSettingsIpConfiguration?>? ipConfiguration, Input<DatabaseInstanceSettingsLocationPreference?>? locationPreference, Input<DatabaseInstanceSettingsMaintenanceWindow?>? maintenanceWindow, Input<DatabaseInstanceSettingsPasswordValidationPolicy?>? passwordValidationPolicy, Input<DatabaseInstanceSettingsPerformanceCaptureConfig?>? performanceCaptureConfig, Input<String?>? pricingPlan, Input<DatabaseInstanceSettingsReadPoolAutoScaleConfig?>? readPoolAutoScaleConfig, Input<int?>? replicationLagMaxSeconds, Input<bool?>? retainBackupsOnDelete, Input<DatabaseInstanceSettingsSqlServerAuditConfig?>? sqlServerAuditConfig, required Input<String> tier, Input<String?>? timeZone, Input<Map<String, String>?>? userLabels, Input<int?>? version})
-
Creates a new DatabaseInstanceSettings.
activationPolicy This specifies when the instance should be
activeDirectoryConfig Optional.
advancedMachineFeatures Optional.
autoUpgradeEnabled Enables
availabilityType The availability type of the Cloud SQL
backupConfiguration Optional.
collation The name of server instance collation.
connectionPoolConfigs The managed connection pool setting for a Cloud SQL instance.
connectorEnforcement Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be REQUIRED or NOT_REQUIRED. If enabled, all the direct connections are rejected.
dataApiAccess Configures ExecuteSql API's access to the instance. connections, can be ALLOW_DATA_API or DISALLOW_DATA_API (default). ALLOW_DATA_API allows using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API.
dataCacheConfig Data cache configurations.
dataDiskProvisionedIops Provisioned number of I/O operations per second for the data disk. This field is only used for HYPERDISK_BALANCED disk types.
dataDiskProvisionedThroughput Provisioned throughput measured in MiB per second for the data disk. This field is only used for HYPERDISK_BALANCED disk types.
databaseFlags Optional.
deletionProtectionEnabled Enables deletion protection of an instance at the GCP level. Enabling this protection will guard against accidental deletion across all surfaces (API, gcloud, Cloud Console and Terraform) by enabling the GCP Cloud SQL instance deletion protection. Terraform provider support was introduced in version 4.48.0. Defaults to false.
denyMaintenancePeriod Optional.
diskAutoresize Enables auto-resizing of the storage size. Defaults to true. Note that if diskSize is set, future pulumi up calls will attempt to delete the instance in order to resize the disk to the value specified in diskSize if it has been resized. To avoid this, ensure that lifecycle.ignore_changes is applied to diskSize.
diskAutoresizeLimit The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
diskSize The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB for PD_SSD, PD_HDD and 20GB for HYPERDISK_BALANCED. Note that this value will override the resizing from diskAutoresize if that feature is enabled. To avoid this, set lifecycle.ignore_changes on this field.
diskType The type of data disk: PD_SSD, PD_HDD, or HYPERDISK_BALANCED. Defaults to PD_SSD.
edition The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS. If edition
effectiveAvailabilityType (Computed) The availability type of
enableDataplexIntegration Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to false.
enableGoogleMlIntegration Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to false.
entraidConfig The Microsoft Entra ID configuration for the SQL Server instance.
finalBackupConfig Config used to determine the final backup settings for the instance
insightsConfig Configuration of Query Insights.
ipConfiguration Optional.
locationPreference Optional.
maintenanceWindow Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
passwordValidationPolicy Optional.
performanceCaptureConfig Configuration of Performance Capture.
pricingPlan Pricing plan for this instance, can only be PER_USE.
readPoolAutoScaleConfig Configuration of Read Pool Auto Scale.
replicationLagMaxSeconds The acceptable replication lag, in seconds, after which a read replica recreates itself. The lag must persist for at least five minutes before recreation is triggered. This is a replica level field, and must be between 300 (five minutes) and 31536000 (one year).
retainBackupsOnDelete When this parameter is set to true, Cloud SQL retains backups of the instance even after the instance is deleted. The ON_DEMAND backup will be retained until customer deletes the backup or the project. The AUTOMATED backup will be retained based on the backups retention setting.
sqlServerAuditConfig Optional.
tier The machine type to use. See tiers
timeZone The timeZone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
userLabels A set of key/value user label pairs to assign to the instance.
version Used to make sure changes to the settings block are
const
-
DatabaseInstanceSettings.fromMap(Map<String, dynamic> map)
-
factory
Properties
-
activationPolicy
→ Input<String?>?
-
This specifies when the instance should be
active. Can be either
ALWAYS, NEVER or ON_DEMAND.
final
-
activeDirectoryConfig
→ Input<DatabaseInstanceSettingsActiveDirectoryConfig?>?
-
final
-
advancedMachineFeatures
→ Input<DatabaseInstanceSettingsAdvancedMachineFeatures?>?
-
final
-
autoUpgradeEnabled
→ Input<bool?>?
-
Enables
Automatic Version Upgrade
feature. When this field is set to
true, Automatic Upgrade is enabled for
MYSQL_8_0 based minor versions. The databaseVersion must be
MYSQL_8_0_35 or higher. Can be used with MySQL only. Can't be unset or
changed if set to true.
final
-
availabilityType
→ Input<String?>?
-
The availability type of the Cloud SQL
instance, high availability (
REGIONAL) or single zone (ZONAL). For all instances, ensure that
settings.backup_configuration.enabled is set to true.
For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true.
For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled
is set to true. Defaults to ZONAL.
For read pool instances, this field is read-only. The availability type is changed by specifying
the number of nodes (nodeCount).
final
-
backupConfiguration
→ Input<DatabaseInstanceSettingsBackupConfiguration?>?
-
final
-
collation
→ Input<String?>?
-
The name of server instance collation.
final
-
connectionPoolConfigs
→ Input<List<DatabaseInstanceSettingsConnectionPoolConfig>?>?
-
The managed connection pool setting for a Cloud SQL instance.
final
-
connectorEnforcement
→ Input<String?>?
-
Control the enforcement of Cloud SQL Auth Proxy or Cloud SQL connectors for all the connections, can be
REQUIRED or NOT_REQUIRED. If enabled, all the direct connections are rejected.
final
-
dataApiAccess
→ Input<String?>?
-
Configures ExecuteSql API's access to the instance. connections, can be
ALLOW_DATA_API or DISALLOW_DATA_API (default). ALLOW_DATA_API allows using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API.
final
-
databaseFlags
→ Input<List<DatabaseInstanceSettingsDatabaseFlag>?>?
-
final
-
dataCacheConfig
→ Input<DatabaseInstanceSettingsDataCacheConfig?>?
-
Data cache configurations.
final
-
dataDiskProvisionedIops
→ Input<int?>?
-
Provisioned number of I/O operations per second for the data disk. This field is only used for
HYPERDISK_BALANCED disk types.
final
-
dataDiskProvisionedThroughput
→ Input<int?>?
-
Provisioned throughput measured in MiB per second for the data disk. This field is only used for
HYPERDISK_BALANCED disk types.
final
-
deletionProtectionEnabled
→ Input<bool?>?
-
Enables deletion protection of an instance at the GCP level. Enabling this protection will guard against accidental deletion across all surfaces (API, gcloud, Cloud Console and Terraform) by enabling the GCP Cloud SQL instance deletion protection. Terraform provider support was introduced in version 4.48.0. Defaults to
false.
final
-
denyMaintenancePeriod
→ Input<DatabaseInstanceSettingsDenyMaintenancePeriod?>?
-
final
-
diskAutoresize
→ Input<bool?>?
-
Enables auto-resizing of the storage size. Defaults to
true. Note that if diskSize is set, future pulumi up calls will attempt to delete the instance in order to resize the disk to the value specified in diskSize if it has been resized. To avoid this, ensure that lifecycle.ignore_changes is applied to diskSize.
final
-
diskAutoresizeLimit
→ Input<int?>?
-
The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.
final
-
diskSize
→ Input<int?>?
-
The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB for
PD_SSD, PD_HDD and 20GB for HYPERDISK_BALANCED. Note that this value will override the resizing from diskAutoresize if that feature is enabled. To avoid this, set lifecycle.ignore_changes on this field.
final
-
diskType
→ Input<String?>?
-
The type of data disk:
PD_SSD, PD_HDD, or HYPERDISK_BALANCED. Defaults to PD_SSD.
final
-
edition
→ Input<String?>?
-
The edition of the instance, can be
ENTERPRISE or ENTERPRISE_PLUS. If edition
is not set, the Cloud SQL API determines the default based on databaseVersion: instances with
databaseVersion POSTGRES_16 or later default to ENTERPRISE_PLUS, while all others default to
ENTERPRISE. Note that ENTERPRISE_PLUS supports only predefined db-perf-optimized-N-* machine
types (the N2/C4A series); shared-core and custom tiers such as db-g1-small, db-f1-micro, and
db-custom-* require edition = "ENTERPRISE". Omitting edition on a PostgreSQL 16+ instance while
setting a shared-core or custom tier therefore fails at create time with
Invalid Tier (...) for (ENTERPRISE_PLUS) Edition.
final
-
effectiveAvailabilityType
→ Input<String?>?
-
(Computed) The availability type of
the Cloud SQL instance, high availability (REGIONAL) or single zone
(ZONAL). This field always contains the value that is reported by the API (for
read pools,
settings.0.effective_availability_type may differ from
settings.0.availability_type).
final
-
enableDataplexIntegration
→ Input<bool?>?
-
Enables Cloud SQL instance integration with Dataplex. MySQL, Postgres and SQL Server instances are supported for this feature. Defaults to
false.
final
-
enableGoogleMlIntegration
→ Input<bool?>?
-
Enables Cloud SQL instances to connect to Vertex AI and pass requests for real-time predictions and insights. Defaults to
false.
final
-
entraidConfig
→ Input<DatabaseInstanceSettingsEntraidConfig?>?
-
The Microsoft Entra ID configuration for the SQL Server instance.
final
-
finalBackupConfig
→ Input<DatabaseInstanceSettingsFinalBackupConfig?>?
-
Config used to determine the final backup settings for the instance
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
insightsConfig
→ Input<DatabaseInstanceSettingsInsightsConfig?>?
-
Configuration of Query Insights.
final
-
ipConfiguration
→ Input<DatabaseInstanceSettingsIpConfiguration?>?
-
final
-
locationPreference
→ Input<DatabaseInstanceSettingsLocationPreference?>?
-
final
-
maintenanceWindow
→ Input<DatabaseInstanceSettingsMaintenanceWindow?>?
-
Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time.
final
-
passwordValidationPolicy
→ Input<DatabaseInstanceSettingsPasswordValidationPolicy?>?
-
final
-
performanceCaptureConfig
→ Input<DatabaseInstanceSettingsPerformanceCaptureConfig?>?
-
Configuration of Performance Capture.
final
-
pricingPlan
→ Input<String?>?
-
Pricing plan for this instance, can only be
PER_USE.
final
-
readPoolAutoScaleConfig
→ Input<DatabaseInstanceSettingsReadPoolAutoScaleConfig?>?
-
Configuration of Read Pool Auto Scale.
final
-
replicationLagMaxSeconds
→ Input<int?>?
-
The acceptable replication lag, in seconds, after which a read replica recreates itself. The lag must persist for at least five minutes before recreation is triggered. This is a replica level field, and must be between
300 (five minutes) and 31536000 (one year).
final
-
retainBackupsOnDelete
→ Input<bool?>?
-
When this parameter is set to true, Cloud SQL retains backups of the instance even after the instance is deleted. The
ON_DEMAND backup will be retained until customer deletes the backup or the project. The AUTOMATED backup will be retained based on the backups retention setting.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
sqlServerAuditConfig
→ Input<DatabaseInstanceSettingsSqlServerAuditConfig?>?
-
final
-
tier
→ Input<String>
-
The machine type to use. See tiers
for more details and supported versions. Postgres supports only shared-core machine types,
and custom machine types such as
db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. Note that shared-core and custom machine types are valid only under the ENTERPRISE edition; PostgreSQL 16+ instances default to ENTERPRISE_PLUS when edition is unset (see the edition argument below).
final
-
timeZone
→ Input<String?>?
-
The timeZone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format.
final
-
userLabels
→ Input<Map<String, String>?>?
-
A set of key/value user label pairs to assign to the instance.
final
-
version
→ Input<int?>?
-
Used to make sure changes to the
settings block are
atomic.
final