@@ -187,6 +187,29 @@ func TestAccTencentCloudEip_bandwidth(t *testing.T) {
187187 })
188188}
189189
190+ func TestAccTencentCloudEip_chargetype (t * testing.T ) {
191+ t .Parallel ()
192+ resource .Test (t , resource.TestCase {
193+ PreCheck : func () { testAccPreCheck (t ) },
194+ Providers : testAccProviders ,
195+ CheckDestroy : testAccCheckEipDestroy ,
196+ Steps : []resource.TestStep {
197+ {
198+ Config : testAccEipChargeType ,
199+ Check : resource .ComposeTestCheckFunc (
200+ testAccCheckEipExists ("tencentcloud_eip.foo" ),
201+ resource .TestCheckResourceAttr ("tencentcloud_eip.foo" , "internet_charge_type" , "TRAFFIC_POSTPAID_BY_HOUR" ),
202+ ),
203+ },
204+ {
205+ ResourceName : "tencentcloud_eip.foo" ,
206+ ImportState : true ,
207+ ImportStateVerify : true ,
208+ },
209+ },
210+ })
211+ }
212+
190213func testAccCheckEipExists (n string ) resource.TestCheckFunc {
191214 return func (s * terraform.State ) error {
192215 logId := getLogId (contextNil )
@@ -312,3 +335,10 @@ resource "tencentcloud_eip" "foo" {
312335 internet_max_bandwidth_out = 2
313336 }
314337`
338+
339+ const testAccEipChargeType = `
340+ resource "tencentcloud_eip" "foo" {
341+ name = "eip_charge_type"
342+ internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
343+ }
344+ `
0 commit comments