You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "Whether the target allow flow come from clb. If value is true, only check security group of clb, or check both clb and backend instance security group.",
167
167
},
168
+
"master_zone_id": {
169
+
Type: schema.TypeString,
170
+
Optional: true,
171
+
Description: "Setting master zone id of cross available zone disaster recovery, only applicable to open CLB.",
172
+
},
173
+
"zone_id": {
174
+
Type: schema.TypeString,
175
+
Optional: true,
176
+
Description: "Available zone id, only applicable to open CLB.",
177
+
},
178
+
"slave_zone_id": {
179
+
Type: schema.TypeString,
180
+
Optional: true,
181
+
Description: "Setting slave zone id of cross available zone disaster recovery, only applicable to open CLB. this zone will undertake traffic when the master is down",
182
+
},
168
183
},
169
184
}
170
185
}
@@ -254,6 +269,26 @@ func resourceTencentCloudClbInstanceCreate(d *schema.ResourceData, meta interfac
254
269
}
255
270
}
256
271
272
+
ifv, ok:=d.GetOk("master_zone_id"); ok {
273
+
ifnetworkType==CLB_NETWORK_TYPE_INTERNAL {
274
+
returnfmt.Errorf("[CHECK][CLB instance][Create] check: INTERNAL network_type do not support master zone id setting")
275
+
}
276
+
request.MasterZoneId=helper.String(v.(string))
277
+
}
278
+
279
+
ifv, ok:=d.GetOk("zone_id"); ok {
280
+
ifnetworkType==CLB_NETWORK_TYPE_INTERNAL {
281
+
returnfmt.Errorf("[CHECK][CLB instance][Create] check: INTERNAL network_type do not support zone id setting")
282
+
}
283
+
request.ZoneId=helper.String(v.(string))
284
+
}
285
+
286
+
ifv, ok:=d.GetOk("slave_zone_id"); ok {
287
+
ifnetworkType==CLB_NETWORK_TYPE_INTERNAL {
288
+
returnfmt.Errorf("[CHECK][CLB instance][Create] check: INTERNAL network_type do not support slave zone id setting")
0 commit comments