Skip to content

Commit

Permalink
fix: mysql mz region
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmkn committed Nov 15, 2024
1 parent 27d7eba commit d6d7db0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,13 @@ func resourceTencentCloudMysqlReadonlyInstanceCreate(d *schema.ResourceData, met

// the mysql master instance must have a backup before creating a read-only instance
masterInstanceId := d.Get("master_instance_id").(string)
masterRegion := ""
if v, ok := d.GetOk("master_region"); ok {
masterRegion = v.(string)
}

err := resource.Retry(2*tccommon.ReadRetryTimeout, func() *resource.RetryError {
backups, err := mysqlService.DescribeBackupsByMysqlId(ctx, masterInstanceId, 10)
backups, err := mysqlService.DescribeBackupsByMysqlIdRegion(ctx, masterInstanceId, 10, masterRegion)
if err != nil {
return resource.NonRetryableError(err)
}
Expand Down

0 comments on commit d6d7db0

Please sign in to comment.