Skip to content

Commit

Permalink
Support setting 'location' in google_sql_database_instance backup_con…
Browse files Browse the repository at this point in the history
  • Loading branch information
danawillow authored and JanMa committed Oct 25, 2019
1 parent bb49c5c commit 4799c48
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/terraform
2 changes: 1 addition & 1 deletion build/terraform-beta
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func resourceSqlDatabaseInstance() *schema.Resource {
// start_time is randomly assigned if not set
Computed: true,
},
"location": {
Type: schema.TypeString,
Optional: true,
},
},
},
},
Expand Down Expand Up @@ -690,6 +694,7 @@ func expandBackupConfiguration(configured []interface{}) *sqladmin.BackupConfigu
BinaryLogEnabled: _backupConfiguration["binary_log_enabled"].(bool),
Enabled: _backupConfiguration["enabled"].(bool),
StartTime: _backupConfiguration["start_time"].(string),
Location: _backupConfiguration["location"].(string),
}
}

Expand Down Expand Up @@ -898,6 +903,7 @@ func flattenBackupConfiguration(backupConfiguration *sqladmin.BackupConfiguratio
"binary_log_enabled": backupConfiguration.BinaryLogEnabled,
"enabled": backupConfiguration.Enabled,
"start_time": backupConfiguration.StartTime,
"location": backupConfiguration.Location,
}

return []map[string]interface{}{data}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,8 @@ resource "google_sql_database_instance" "instance" {
availability_type = "REGIONAL"

backup_configuration {
enabled = true
enabled = true
location = "us"
}
}
}
Expand Down

0 comments on commit 4799c48

Please sign in to comment.