@@ -227,38 +227,6 @@ func TestAccTencentCloudMysqlMasterInstance_basic_and_update(t *testing.T) {
227227 })
228228}
229229
230- func TestAccTencentCloudMysqlPrepaid (t * testing.T ) {
231- t .Parallel ()
232- resource .Test (t , resource.TestCase {
233- PreCheck : func () { testAccPreCheck (t ) },
234- Providers : testAccProviders ,
235- CheckDestroy : testAccCheckMysqlMasterInstanceDestroy ,
236- Steps : []resource.TestStep {
237- {
238- Config : testAccMysqlMasterInstance_prepaid (),
239- Check : resource .ComposeAggregateTestCheckFunc (
240- testAccCheckMysqlMasterInstanceExists ("tencentcloud_mysql_instance.prepaid" ),
241- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "instance_name" , "testAccMysqlPrepaid" ),
242- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "slave_deploy_mode" , "0" ),
243- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "slave_sync_mode" , "0" ),
244- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "availability_zone" , TestAccTencentCloudMysqlMasterInstance_availability_zone ),
245- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "first_slave_zone" , TestAccTencentCloudMysqlMasterInstance_availability_zone ),
246- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "auto_renew_flag" , "0" ),
247- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "charge_type" , "PREPAID" ),
248- ),
249- },
250- // update auto_renew_flag
251- {
252- Config : testAccMysqlMasterInstance_prepaidupdate (),
253- Check : resource .ComposeAggregateTestCheckFunc (
254- testAccCheckMysqlMasterInstanceExists ("tencentcloud_mysql_instance.prepaid" ),
255- resource .TestCheckResourceAttr ("tencentcloud_mysql_instance.prepaid" , "auto_renew_flag" , "1" ),
256- ),
257- },
258- },
259- })
260- }
261-
262230func testAccCheckMysqlMasterInstanceDestroy (s * terraform.State ) error {
263231 logId := getLogId (contextNil )
264232 ctx := context .WithValue (context .TODO (), logIdKey , logId )
@@ -323,39 +291,6 @@ resource "tencentcloud_mysql_instance" "mysql_master" {
323291}`
324292}
325293
326- func testAccMysqlMasterInstance_prepaid () string {
327- return `
328- resource "tencentcloud_mysql_instance" "prepaid" {
329- charge_type = "PREPAID"
330- mem_size = 1000
331- volume_size = 50
332- instance_name = "testAccMysqlPrepaid"
333- engine_version = "5.7"
334- root_password = "test1234"
335- intranet_port = 3360
336- availability_zone = "ap-guangzhou-3"
337- first_slave_zone = "ap-guangzhou-3"
338- force_delete = false
339- }`
340- }
341-
342- func testAccMysqlMasterInstance_prepaidupdate () string {
343- return `
344- resource "tencentcloud_mysql_instance" "prepaid" {
345- charge_type = "PREPAID"
346- mem_size = 1000
347- volume_size = 50
348- auto_renew_flag = 1
349- instance_name = "testAccMysqlPrepaid"
350- engine_version = "5.7"
351- root_password = "test1234"
352- intranet_port = 3360
353- availability_zone = "ap-guangzhou-3"
354- first_slave_zone = "ap-guangzhou-3"
355- force_delete = false
356- }`
357- }
358-
359294func testAccMysqlMasterInstance_fullslave () string {
360295 return `
361296resource "tencentcloud_mysql_instance" "mysql_master" {
0 commit comments