Skip to content

Commit e3cdd3a

Browse files
authored
fix: eip - disable param validation (#1492)
1 parent 0973685 commit e3cdd3a

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

tencentcloud/resource_tc_eip.go

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,17 @@ func resourceTencentCloudEip() *schema.Resource {
5050
Description: "The name of eip.",
5151
},
5252
"type": {
53-
Type: schema.TypeString,
54-
Optional: true,
55-
Default: EIP_TYPE_EIP,
56-
ForceNew: true,
57-
ValidateFunc: validateAllowedStringValue(EIP_TYPE),
58-
Description: "The type of eip. Valid value: `EIP` and `AnycastEIP` and `HighQualityEIP`. Default is `EIP`.",
53+
Type: schema.TypeString,
54+
Optional: true,
55+
Default: EIP_TYPE_EIP,
56+
ForceNew: true,
57+
Description: "The type of eip. Valid value: `EIP` and `AnycastEIP` and `HighQualityEIP`. Default is `EIP`.",
5958
},
6059
"anycast_zone": {
61-
Type: schema.TypeString,
62-
Optional: true,
63-
ForceNew: true,
64-
ValidateFunc: validateAllowedStringValue(EIP_ANYCAST_ZONE),
65-
Description: "The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.",
60+
Type: schema.TypeString,
61+
Optional: true,
62+
ForceNew: true,
63+
Description: "The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.",
6664
},
6765
"applicable_for_clb": {
6866
Type: schema.TypeBool,
@@ -71,19 +69,17 @@ func resourceTencentCloudEip() *schema.Resource {
7169
Deprecated: "It has been deprecated from version 1.27.0.",
7270
},
7371
"internet_service_provider": {
74-
Type: schema.TypeString,
75-
Optional: true,
76-
ForceNew: true,
77-
ValidateFunc: validateAllowedStringValue(EIP_INTERNET_PROVIDER),
78-
Description: "Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.",
72+
Type: schema.TypeString,
73+
Optional: true,
74+
ForceNew: true,
75+
Description: "Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.",
7976
},
8077
"internet_charge_type": {
81-
Type: schema.TypeString,
82-
Optional: true,
83-
Computed: true,
84-
ForceNew: true,
85-
ValidateFunc: validateAllowedStringValue(CVM_INTERNET_CHARGE_TYPE),
86-
Description: "The charge type of eip. Valid value: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR` and `TRAFFIC_POSTPAID_BY_HOUR`.",
78+
Type: schema.TypeString,
79+
Optional: true,
80+
Computed: true,
81+
ForceNew: true,
82+
Description: "The charge type of eip. Valid values: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR`, `BANDWIDTH_PREPAID_BY_MONTH` and `TRAFFIC_POSTPAID_BY_HOUR`.",
8783
},
8884
"internet_max_bandwidth_out": {
8985
Type: schema.TypeInt,

website/docs/r/eip.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The following arguments are supported:
2525

2626
* `anycast_zone` - (Optional, String, ForceNew) The zone of anycast. Valid value: `ANYCAST_ZONE_GLOBAL` and `ANYCAST_ZONE_OVERSEAS`.
2727
* `applicable_for_clb` - (Optional, Bool, **Deprecated**) It has been deprecated from version 1.27.0. Indicates whether the anycast eip can be associated to a CLB.
28-
* `internet_charge_type` - (Optional, String, ForceNew) The charge type of eip. Valid value: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR` and `TRAFFIC_POSTPAID_BY_HOUR`.
28+
* `internet_charge_type` - (Optional, String, ForceNew) The charge type of eip. Valid values: `BANDWIDTH_PACKAGE`, `BANDWIDTH_POSTPAID_BY_HOUR`, `BANDWIDTH_PREPAID_BY_MONTH` and `TRAFFIC_POSTPAID_BY_HOUR`.
2929
* `internet_max_bandwidth_out` - (Optional, Int) The bandwidth limit of EIP, unit is Mbps.
3030
* `internet_service_provider` - (Optional, String, ForceNew) Internet service provider of eip. Valid value: `BGP`, `CMCC`, `CTCC` and `CUCC`.
3131
* `name` - (Optional, String) The name of eip.

0 commit comments

Comments
 (0)