SqlDatabaseInstanceSettings class
settings block. Required in practice for any non-trivial instance —
at minimum supply tier. The remaining knobs default to GCP's
per-tier sensible values; override only the ones you need.
Rarely-touched sub-blocks (active_directory_config,
sql_server_audit_config, entraid_config,
password_validation_policy, connection_pool_config,
read_pool_auto_scale_config, data_cache_config,
advanced_machine_features, deny_maintenance_period,
final_backup_config, insights_config) are not modeled as typed
helpers; pass a raw Map<String, Object?> via advancedExtra keyed
by the Terraform block name when you need them.
- Annotations
-
- @immutable
Constructors
-
SqlDatabaseInstanceSettings({TfArg<
String> ? tier, TfArg<SqlAvailabilityType> ? availabilityType, TfArg<SqlEdition> ? edition, TfArg<SqlActivationPolicy> ? activationPolicy, TfArg<int> ? diskSize, TfArg<SqlDiskType> ? diskType, TfArg<bool> ? diskAutoresize, TfArg<int> ? diskAutoresizeLimit, TfArg<Map< ? userLabels, TfArg<String, String> >String> ? collation, TfArg<String> ? timeZone, TfArg<String> ? connectorEnforcement, TfArg<String> ? dataApiAccess, TfArg<bool> ? deletionProtectionEnabled, TfArg<bool> ? retainBackupsOnDelete, TfArg<String> ? pricingPlan, TfArg<bool> ? enableDataplexIntegration, TfArg<bool> ? enableGoogleMlIntegration, TfArg<bool> ? autoUpgradeEnabled, SqlDatabaseInstanceIpConfiguration? ipConfiguration, SqlDatabaseInstanceBackupConfiguration? backupConfiguration, SqlDatabaseInstanceLocationPreference? locationPreference, SqlDatabaseInstanceMaintenanceWindow? maintenanceWindow, List<SqlDatabaseInstanceDatabaseFlag> ? databaseFlags, Map<String, Object?> ? advancedExtra}) -
const
Properties
-
activationPolicy
→ TfArg<
SqlActivationPolicy> ? -
24/7 vs stopped. Most instances stay on SqlActivationPolicy.always.
final
-
advancedExtra
→ Map<
String, Object?> ? -
Escape hatch for the less-curated sub-blocks listed in this class's
doc comment. Keys are Terraform block names; values are the block
payload (single block →
[{...}], set → list of maps).final -
autoUpgradeEnabled
→ TfArg<
bool> ? -
MySQL automatic version upgrade. Has no effect on Postgres /
SQL Server.
final
-
availabilityType
→ TfArg<
SqlAvailabilityType> ? -
HA mode:
regional(multi-zone failover) vszonal(single-zone).final - backupConfiguration → SqlDatabaseInstanceBackupConfiguration?
-
Automatic backups + point-in-time recovery.
final
-
collation
→ TfArg<
String> ? -
Server collation (SQL Server only).
final
-
connectorEnforcement
→ TfArg<
String> ? -
Cloud SQL Auth Proxy / connector enforcement
(
'REQUIRED'/'NOT_REQUIRED').final -
dataApiAccess
→ TfArg<
String> ? -
'EXECUTE_SQL_ENABLED'to opt in to the ExecuteSql API.final -
databaseFlags
→ List<
SqlDatabaseInstanceDatabaseFlag> ? -
Engine-level flags (e.g.
max_connections,log_min_duration).final -
deletionProtectionEnabled
→ TfArg<
bool> ? -
API-level deletion protection. Separate from the top-level
GoogleSqlDatabaseInstance.deletionProtection(which is enforced by Terraform).final -
diskAutoresize
→ TfArg<
bool> ? -
Whether storage automatically grows. Default
true.final -
diskAutoresizeLimit
→ TfArg<
int> ? -
Ceiling for auto-grow, in GB.
0means "no limit (within quota)".final -
diskSize
→ TfArg<
int> ? -
Data disk size in GB. Existing instances cannot be shrunk.
final
-
diskType
→ TfArg<
SqlDiskType> ? -
Disk type. Tier-dependent.
final
-
edition
→ TfArg<
SqlEdition> ? -
Enterprise vs Enterprise Plus. ENTERPRISE_PLUS unlocks data cache,
HDR, and the read-pool instance type.
final
-
enableDataplexIntegration
→ TfArg<
bool> ? -
Toggle Dataplex integration.
final
-
enableGoogleMlIntegration
→ TfArg<
bool> ? -
Toggle Vertex AI integration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ipConfiguration → SqlDatabaseInstanceIpConfiguration?
-
IP connectivity configuration —
ipv4_enabled,private_network,authorized_networks, SSL mode. The private-IP cornerstone for the Wave 5 chain.final - locationPreference → SqlDatabaseInstanceLocationPreference?
-
Zone / failover-zone preferences. Typically auto-selected.
final
- maintenanceWindow → SqlDatabaseInstanceMaintenanceWindow?
-
Maintenance window (day / hour / track).
final
-
pricingPlan
→ TfArg<
String> ? -
Pricing plan. The only currently supported value is
'PER_USE'.final -
retainBackupsOnDelete
→ TfArg<
bool> ? -
Retain backups when the instance is deleted.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tier
→ TfArg<
String> ? -
Machine type / instance shape. Examples:
'db-perf-optimized-N-2','db-custom-2-7680','db-f1-micro'(legacy shared-core, dev only).final -
timeZone
→ TfArg<
String> ? -
Database engine timezone (SQL Server only — Posix string).
final
-
userLabels
→ TfArg<
Map< ?String, String> > -
Free-form key/value labels.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toArgMap(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited