@@ -39,62 +39,62 @@ func resourceAlibabacloudStackDBReadonlyInstance() *schema.Resource {
39
39
},
40
40
41
41
"master_db_instance_id" : {
42
- Type : schema .TypeString ,
43
- Optional :true ,
44
- Computed :true ,
45
- ForceNew : true ,
46
- Deprecated : "Field 'master_db_instance_id' is deprecated and will be removed in a future release. Please use new field 'master_instance_id' instead." ,
42
+ Type : schema .TypeString ,
43
+ Optional : true ,
44
+ Computed : true ,
45
+ ForceNew : true ,
46
+ Deprecated : "Field 'master_db_instance_id' is deprecated and will be removed in a future release. Please use new field 'master_instance_id' instead." ,
47
47
ConflictsWith : []string {"master_instance_id" },
48
48
},
49
49
"master_instance_id" : {
50
- Type : schema .TypeString ,
51
- Optional :true ,
52
- Computed :true ,
53
- ForceNew : true ,
50
+ Type : schema .TypeString ,
51
+ Optional : true ,
52
+ Computed : true ,
53
+ ForceNew : true ,
54
54
ConflictsWith : []string {"master_db_instance_id" },
55
55
},
56
56
57
57
"instance_name" : {
58
- Type : schema .TypeString ,
59
- Optional : true ,
60
- ValidateFunc : validation .StringLenBetween (2 , 256 ),
61
- Computed : true ,
62
- Deprecated : "Field 'instance_name' is deprecated and will be removed in a future release. Please use new field 'db_instance_description' instead." ,
58
+ Type : schema .TypeString ,
59
+ Optional : true ,
60
+ ValidateFunc : validation .StringLenBetween (2 , 256 ),
61
+ Computed : true ,
62
+ Deprecated : "Field 'instance_name' is deprecated and will be removed in a future release. Please use new field 'db_instance_description' instead." ,
63
63
ConflictsWith : []string {"db_instance_description" },
64
64
},
65
65
"db_instance_description" : {
66
- Type : schema .TypeString ,
67
- Optional : true ,
68
- ValidateFunc : validation .StringLenBetween (2 , 256 ),
69
- Computed : true ,
66
+ Type : schema .TypeString ,
67
+ Optional : true ,
68
+ ValidateFunc : validation .StringLenBetween (2 , 256 ),
69
+ Computed : true ,
70
70
ConflictsWith : []string {"instance_name" },
71
71
},
72
72
73
73
"instance_type" : {
74
- Type : schema .TypeString ,
75
- Optional :true ,
76
- Computed :true ,
77
- Deprecated : "Field 'instance_type' is deprecated and will be removed in a future release. Please use new field 'db_instance_class' instead." ,
74
+ Type : schema .TypeString ,
75
+ Optional : true ,
76
+ Computed : true ,
77
+ Deprecated : "Field 'instance_type' is deprecated and will be removed in a future release. Please use new field 'db_instance_class' instead." ,
78
78
ConflictsWith : []string {"db_instance_class" },
79
79
},
80
80
"db_instance_class" : {
81
- Type : schema .TypeString ,
82
- Optional :true ,
83
- Computed :true ,
81
+ Type : schema .TypeString ,
82
+ Optional : true ,
83
+ Computed : true ,
84
84
ConflictsWith : []string {"instance_type" },
85
85
},
86
86
87
87
"instance_storage" : {
88
- Type : schema .TypeInt ,
89
- Optional :true ,
90
- Computed :true ,
91
- Deprecated : "Field 'instance_storage' is deprecated and will be removed in a future release. Please use new field 'db_instance_storage' instead." ,
88
+ Type : schema .TypeInt ,
89
+ Optional : true ,
90
+ Computed : true ,
91
+ Deprecated : "Field 'instance_storage' is deprecated and will be removed in a future release. Please use new field 'db_instance_storage' instead." ,
92
92
ConflictsWith : []string {"db_instance_storage" },
93
93
},
94
94
"db_instance_storage" : {
95
- Type : schema .TypeInt ,
96
- Optional :true ,
97
- Computed :true ,
95
+ Type : schema .TypeInt ,
96
+ Optional : true ,
97
+ Computed : true ,
98
98
ConflictsWith : []string {"instance_storage" },
99
99
},
100
100
@@ -144,7 +144,6 @@ func resourceAlibabacloudStackDBReadonlyInstance() *schema.Resource {
144
144
Type : schema .TypeString ,
145
145
Computed : true ,
146
146
},
147
-
148
147
"port" : {
149
148
Type : schema .TypeString ,
150
149
Computed : true ,
@@ -210,7 +209,7 @@ func resourceAlibabacloudStackDBReadonlyInstanceUpdate(d *schema.ResourceData, m
210
209
211
210
if d .IsNewResource () {
212
211
d .Partial (false )
213
- return resourceAlibabacloudStackDBInstanceRead (d , meta )
212
+ return resourceAlibabacloudStackDBReadonlyInstanceRead (d , meta )
214
213
}
215
214
216
215
if d .HasChanges ("db_instance_description" , "instance_name" ) {
@@ -438,7 +437,7 @@ func buildDBReadonlyCreateRequest(d *schema.ResourceData, meta interface{}) (*rd
438
437
}
439
438
request .DBInstanceClass = Trim (connectivity .GetResourceData (d , "db_instance_class" , "instance_type" ).(string ))
440
439
if err := errmsgs .CheckEmpty (request .DBInstanceClass , schema .TypeString , "db_instance_class" , "instance_type" ); err != nil {
441
- return request , errmsgs .WrapError (err )
440
+ return request , errmsgs .WrapError (err )
442
441
}
443
442
request .DBInstanceDescription = connectivity .GetResourceData (d , "db_instance_description" , "instance_name" ).(string )
444
443
request .DBInstanceStorageType = d .Get ("db_instance_storage_type" ).(string )
0 commit comments