CloudSQL-instance: Fixed terraform change detection when backup is disabled. (#615)
* Update variables.tf When backup is not enabled, if location is set to a null value (i.e."EU"), each time you do `terraform apply` it will detect a configuration change (+ location = "EU"). Setting this variable to null fixes the issue. * Update README.md
This commit is contained in:
parent
55b6a88f88
commit
86357c2ed5
|
@ -107,7 +107,7 @@ module "db" {
|
|||
| [tier](variables.tf#L123) | The machine type to use for the instances. | <code>string</code> | ✓ | |
|
||||
| [authorized_networks](variables.tf#L17) | Map of NAME=>CIDR_RANGE to allow to connect to the database(s). | <code>map(string)</code> | | <code>null</code> |
|
||||
| [availability_type](variables.tf#L23) | Availability type for the primary replica. Either `ZONAL` or `REGIONAL`. | <code>string</code> | | <code>"ZONAL"</code> |
|
||||
| [backup_configuration](variables.tf#L29) | Backup settings for primary instance. Will be automatically enabled if using MySQL with one or more replicas. | <code title="object({ enabled = bool binary_log_enabled = bool start_time = string location = string log_retention_days = number retention_count = number })">object({…})</code> | | <code title="{ enabled = false binary_log_enabled = false start_time = "23:00" location = "EU" log_retention_days = 7 retention_count = 7 }">{…}</code> |
|
||||
| [backup_configuration](variables.tf#L29) | Backup settings for primary instance. Will be automatically enabled if using MySQL with one or more replicas. | <code title="object({ enabled = bool binary_log_enabled = bool start_time = string location = string log_retention_days = number retention_count = number })">object({…})</code> | | <code title="{ enabled = false binary_log_enabled = false start_time = "23:00" location = null log_retention_days = 7 retention_count = 7 }">{…}</code> |
|
||||
| [databases](variables.tf#L55) | Databases to create once the primary instance is created. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [deletion_protection](variables.tf#L61) | Allow terraform to delete instances. | <code>bool</code> | | <code>false</code> |
|
||||
| [disk_size](variables.tf#L67) | Disk size in GB. Set to null to enable autoresize. | <code>number</code> | | <code>null</code> |
|
||||
|
|
|
@ -40,7 +40,7 @@ variable "backup_configuration" {
|
|||
enabled = false
|
||||
binary_log_enabled = false
|
||||
start_time = "23:00"
|
||||
location = "EU"
|
||||
location = null
|
||||
log_retention_days = 7
|
||||
retention_count = 7
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue