@@ -132,6 +132,24 @@ func TestAccTencentCloudPostgresqlReadonlyInstanceResource_update_ro_group(t *te
132
132
})
133
133
}
134
134
135
+ func TestAccTencentCloudPostgresqlReadonlyInstanceResource_prepaid (t * testing.T ) {
136
+ resource .Test (t , resource.TestCase {
137
+ PreCheck : func () {
138
+ tcacctest .AccPreCheck (t )
139
+ },
140
+ Providers : tcacctest .AccProviders ,
141
+ Steps : []resource.TestStep {
142
+ {
143
+ Config : testAccPostgresqlReadonlyInstanceInstance_prepaid ,
144
+ Check : resource .ComposeTestCheckFunc (
145
+ resource .TestCheckResourceAttrSet (testPostgresqlReadonlyInstanceResourceKey , "id" ),
146
+ resource .TestCheckResourceAttr (testPostgresqlReadonlyInstanceResourceKey , "instance_charge_type" , "PREPAID" ),
147
+ ),
148
+ },
149
+ },
150
+ })
151
+ }
152
+
135
153
const testAccPostgresqlReadonlyInstanceInstance_basic_without_rogroup string = tcacctest .OperationPresetPGSQL + tcacctest .DefaultVpcSubnets + tcacctest .DefaultSecurityGroupData + `
136
154
resource "tencentcloud_postgresql_readonly_instance" "instance" {
137
155
auto_renew_flag = 0
@@ -244,3 +262,22 @@ const testAccPostgresqlReadonlyInstanceInstance_update_rogroup string = tcacctes
244
262
min_delay_eliminate_reserve = 1
245
263
}
246
264
`
265
+
266
+ const testAccPostgresqlReadonlyInstanceInstance_prepaid = `
267
+ resource "tencentcloud_postgresql_readonly_instance" "instance" {
268
+ db_version = "17.0"
269
+ instance_charge_type = "PREPAID"
270
+ period = 1
271
+ master_db_instance_id = "postgres-25816pex"
272
+ memory = 4
273
+ cpu = 2
274
+ name = "tf_ro_instance_test_rog"
275
+ need_support_ipv6 = 0
276
+ project_id = 0
277
+ security_groups_ids = ["sg-kensue7b"]
278
+ storage = 20
279
+ vpc_id = "vpc-48tmc13b"
280
+ subnet_id = "subnet-96hw3j18"
281
+ zone = "ap-guangzhou-3"
282
+ }
283
+ `
0 commit comments