@@ -318,7 +318,7 @@ func resourceTencentCloudMysqlInstance() *schema.Resource {
318318}
319319
320320/*
321- [master] and [dr] and [ro] all need set
321+ [master] and [dr] and [ro] all need set
322322*/
323323func mysqlAllInstanceRoleSet (ctx context.Context , requestInter interface {}, d * schema.ResourceData , meta interface {}) error {
324324 requestByMonth , okByMonth := requestInter .(* cdb.CreateDBInstanceRequest )
@@ -438,7 +438,7 @@ func mysqlAllInstanceRoleSet(ctx context.Context, requestInter interface{}, d *s
438438}
439439
440440/*
441- [master] need set
441+ [master] need set
442442*/
443443func mysqlMasterInstanceRoleSet (ctx context.Context , requestInter interface {}, d * schema.ResourceData , meta interface {}) error {
444444 requestByMonth , okByMonth := requestInter .(* cdb.CreateDBInstanceRequest )
@@ -916,7 +916,6 @@ func resourceTencentCloudMysqlInstanceRead(d *schema.ResourceData, meta interfac
916916 log .Printf ("[CRITAL]%s provider set caresParameters fail, reason:%s\n " , logId , e .Error ())
917917 return resource .NonRetryableError (e )
918918 }
919- _ = d .Set ("availability_zone" , mysqlInfo .Zone )
920919 return nil
921920 })
922921 if err != nil {
@@ -944,6 +943,10 @@ func resourceTencentCloudMysqlInstanceRead(d *schema.ResourceData, meta interfac
944943 if backConfig .Response .BackupConfig != nil && * backConfig .Response .BackupConfig .Zone != "" {
945944 _ = d .Set ("second_slave_zone" , * backConfig .Response .BackupConfig .Zone )
946945 }
946+
947+ if backConfig .Response .Zone != nil {
948+ _ = d .Set ("availability_zone" , * backConfig .Response .Zone )
949+ }
947950 return nil
948951 })
949952 if err != nil {
@@ -953,7 +956,7 @@ func resourceTencentCloudMysqlInstanceRead(d *schema.ResourceData, meta interfac
953956}
954957
955958/*
956- [master] and [dr] and [ro] all need update
959+ [master] and [dr] and [ro] all need update
957960*/
958961func mysqlAllInstanceRoleUpdate (ctx context.Context , d * schema.ResourceData , meta interface {}, isReadonly bool ) error {
959962
@@ -1206,7 +1209,7 @@ func mysqlAllInstanceRoleUpdate(ctx context.Context, d *schema.ResourceData, met
12061209}
12071210
12081211/*
1209- [master] need set
1212+ [master] need set
12101213*/
12111214func mysqlMasterInstanceRoleUpdate (ctx context.Context , d * schema.ResourceData , meta interface {}) error {
12121215 logId := getLogId (ctx )
0 commit comments