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: "Period of instance to be prepaid. Valid value: `1`, `2`, `3`, `4`, `6`, `7`, `8`, `9`, `12`, `24`, `36`. The unit is month. Caution: when this para and renew_flag para are valid, the request means to renew several months more pre-paid period. This para can only be set to take effect in create operation.",
123
+
Description: "Period of instance to be prepaid. Valid value: `1`, `2`, `3`, `4`, `6`, `7`, `8`, `9`, `12`, `24`, `36`. The unit is month. Caution: when this para and renew_flag para are valid, the request means to renew several months more pre-paid period. This para can only be changed on `IPSEC` vpn gateway.",
124
124
},
125
125
"charge_type": {
126
126
Type: schema.TypeString,
@@ -351,7 +351,6 @@ func resourceTencentCloudVpnGatewayUpdate(d *schema.ResourceData, meta interface
351
351
gatewayId:=d.Id()
352
352
353
353
unsupportedUpdateFields:= []string{
354
-
"prepaid_period",
355
354
"type",
356
355
}
357
356
for_, field:=rangeunsupportedUpdateFields {
@@ -360,6 +359,33 @@ func resourceTencentCloudVpnGatewayUpdate(d *schema.ResourceData, meta interface
360
359
}
361
360
}
362
361
362
+
ifd.HasChange("prepaid_period") {
363
+
chargeType:=d.Get("charge_type").(string)
364
+
period:=d.Get("prepaid_period").(int)
365
+
ifchargeType!=VPN_CHARGE_TYPE_PREPAID {
366
+
returnfmt.Errorf("Invalid renew flag change. Only support pre-paid vpn.")
Copy file name to clipboardExpand all lines: website/docs/r/vpn_gateway.html.markdown
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ The following arguments are supported:
57
57
*`cdc_id` - (Optional, String) CDC instance ID.
58
58
*`charge_type` - (Optional, String) Charge Type of the VPN gateway. Valid value: `PREPAID`, `POSTPAID_BY_HOUR`. The default is `POSTPAID_BY_HOUR`.
59
59
*`max_connection` - (Optional, Int) Maximum number of connected clients allowed for the SSL VPN gateway. Valid values: [5, 10, 20, 50, 100]. This parameter is only required for SSL VPN gateways.
60
-
*`prepaid_period` - (Optional, Int) Period of instance to be prepaid. Valid value: `1`, `2`, `3`, `4`, `6`, `7`, `8`, `9`, `12`, `24`, `36`. The unit is month. Caution: when this para and renew_flag para are valid, the request means to renew several months more pre-paid period. This para can only be set to take effect in create operation.
60
+
*`prepaid_period` - (Optional, Int) Period of instance to be prepaid. Valid value: `1`, `2`, `3`, `4`, `6`, `7`, `8`, `9`, `12`, `24`, `36`. The unit is month. Caution: when this para and renew_flag para are valid, the request means to renew several months more pre-paid period. This para can only be changed on `IPSEC` vpn gateway.
61
61
*`prepaid_renew_flag` - (Optional, String) Flag indicates whether to renew or not. Valid value: `NOTIFY_AND_AUTO_RENEW`, `NOTIFY_AND_MANUAL_RENEW`.
62
62
*`tags` - (Optional, Map) A list of tags used to associate different resources.
63
63
*`type` - (Optional, String) Type of gateway instance. Valid value: `IPSEC`, `SSL` and `CCN`. Note: CCN type is only for whitelist customer now.
0 commit comments