terraform-google-sql-db
terraform-google-sql-db copied to clipboard
Configuring non-regional failover
TL;DR
Using other means (e.g. Google Cloud Deployment Manager) it's possible to configure failover for the zonal availability type. E.g.
gcloud --project **** sql instances describe ******
backendType: SECOND_GEN
...
failoverReplica:
available: true
name: ******
...
settings:
activationPolicy: ALWAYS
availabilityType: ZONAL
backupConfiguration:
backupRetentionSettings:
retainedBackups: 7
retentionUnit: COUNT
binaryLogEnabled: true
enabled: true
kind: sql#backupConfiguration
startTime: 02:00
transactionLogRetentionDays: 7
If it's possible to configure this using terraform-google-sql-db
then I can't figure it out from the documentation or the code.
Terraform Resources
See failover_target
in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance
Detailed design
No response
Additional information
No response
This isn't currently supported in this module. We'd be happy to review a PR adding it.
@mans0954 have you tried this parameter using resource directly? I am not sure if you can set this parameter for cloudSql anymore. Is this a parameter for legacy HA. I tried setting it up in resource directly and received following error.
googleapi: Error 400: The incoming request contained invalid data., invalidRequest