Skip to content

Commit 761e269

Browse files
authored
Merge pull request #2 from terraform-providers/master
Merge
2 parents b8cfd30 + 8775716 commit 761e269

8 files changed

+28
-20
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
## 1.23.0 (Unreleased)
1+
## 1.24.0 (Unreleased)
2+
## 1.23.0 (November 14, 2019)
23

34
FEATURES:
45

6+
* **New Data Source**: `tencentcloud_images`
57
* **New Data Source**: `tencentcloud_vpn_gateways`
68
* **New Data Source**: `tencentcloud_customer_gateways`
79
* **New Data Source**: `tencentcloud_vpn_connections`
810
* **New Resource**: `tencentcloud_vpn_gateway`
911
* **New Resource**: `tencentcloud_customer_gateway`
1012
* **New Resource**: `tencentcloud_vpn_connection`
11-
* **New Data Source**: `tencentcloud_images`
1213
* **Provider TencentCloud**: add `security_token` argument
1314

1415
ENHANCEMENTS:

tencentcloud/extension_cvm.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ const (
3131

3232
ZONE_STATE_AVAILABLE = "AVAILABLE"
3333
ZONE_STATE_UNAVAILABLE = "UNAVAILABLE"
34+
35+
CVM_NOT_FOUND_ERROR = "InvalidInstanceId.NotFound"
3436
)
3537

3638
var CVM_CHARGE_TYPE = []string{

tencentcloud/extension_vpc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,4 +268,3 @@ var VPN_IPSEC_ENCRY_ALGORITHM = []string{
268268
const (
269269
VPCNotFound = "ResourceNotFound"
270270
)
271-

tencentcloud/resource_tc_key_pair.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626

2727
"github.com/hashicorp/terraform/helper/resource"
2828
"github.com/hashicorp/terraform/helper/schema"
29+
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors"
2930
cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
3031
)
3132

@@ -186,6 +187,11 @@ func resourceTencentCloudKeyPairDelete(d *schema.ResourceData, meta interface{})
186187
err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
187188
errRet := cvmService.UnbindKeyPair(ctx, keyId, keyPair.AssociatedInstanceIds)
188189
if errRet != nil {
190+
if sdkErr, ok := errRet.(*errors.TencentCloudSDKError); ok {
191+
if sdkErr.Code == CVM_NOT_FOUND_ERROR {
192+
return nil
193+
}
194+
}
189195
return retryError(errRet)
190196
}
191197
return nil
@@ -198,7 +204,7 @@ func resourceTencentCloudKeyPairDelete(d *schema.ResourceData, meta interface{})
198204
err = resource.Retry(writeRetryTimeout, func() *resource.RetryError {
199205
errRet := cvmService.DeleteKeyPair(ctx, keyId)
200206
if errRet != nil {
201-
return retryError(errRet)
207+
return retryError(errRet, "InvalidKeyPair")
202208
}
203209
return nil
204210
})

tencentcloud/resource_tc_vpn_connection.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ func resourceTencentCloudVpnConnection() *schema.Resource {
222222
Optional: true,
223223
Default: "NULL",
224224
ValidateFunc: validateAllowedStringValue(VPN_IPSEC_PFS_DH_GROUP_NAME),
225-
Description: "PFS DH group , valid values are `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.",
225+
Description: "PFS DH group, valid values are `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.",
226226
},
227227
"ipsec_sa_lifetime_traffic": {
228228
Type: schema.TypeInt,
229229
Optional: true,
230230
Default: 1843200,
231-
ValidateFunc: validateIntegerInRange(2560, 4294967295),
232-
Description: "SA lifetime of the IPSEC operation specification, unit is `KB`. The value ranges from 2560 to 4294967295. Default value is 1843200.",
231+
ValidateFunc: validateIntegerMin(2560),
232+
Description: "SA lifetime of the IPSEC operation specification, unit is `KB`. The value should not be less then 2560. Default value is 1843200.",
233233
},
234234
"tags": {
235235
Type: schema.TypeMap,

website/docs/d/nat_gateways.html.markdown

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ data "tencentcloud_nat_gateways" "foo" {
2424

2525
The following arguments are supported:
2626

27-
* `id` - (Optional) ID of the nat gateway.
28-
* `name` - (Optional) Name of the nat gateway.
27+
* `id` - (Optional) ID of the NAT gateway.
28+
* `name` - (Optional) Name of the NAT gateway.
2929
* `result_output_file` - (Optional) Used to save results.
3030
* `vpc_id` - (Optional) ID of the vpc.
3131

3232
## Attributes Reference
3333

3434
In addition to all arguments above, the following attributes are exported:
3535

36-
* `nats` - Information list of the dedicated tunnels.
36+
* `nats` - Information list of the dedicated nats.
3737
* `assigned_eip_set` - EIP arrays bound to the gateway. The value of at least 1.
38-
* `bandwidth` - The maximum public network output bandwidth of nat gateway (unit: Mbps), the available values include: 20,50,100,200,500,1000,2000,5000. Default is 100.
39-
* `create_time` - Create time of the nat gateway.
40-
* `id` - ID of the nat gateway.
41-
* `max_concurrent` - The upper limit of concurrent connection of nat gateway, the available values include: 1000000,3000000,10000000. Default is 1000000.
42-
* `name` - Name of the nat gateway.
43-
* `state` - State of the nat gateway.
38+
* `bandwidth` - The maximum public network output bandwidth of NAT gateway (unit: Mbps), the available values include: 20,50,100,200,500,1000,2000,5000. Default is 100.
39+
* `create_time` - Create time of the NAT gateway.
40+
* `id` - ID of the NAT gateway.
41+
* `max_concurrent` - The upper limit of concurrent connection of NAT gateway, the available values include: 1000000,3000000,10000000. Default is 1000000.
42+
* `name` - Name of the NAT gateway.
43+
* `state` - State of the NAT gateway.
4444
* `vpc_id` - ID of the vpc.
4545

4646

website/docs/r/nat_gateway.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ resource "tencentcloud_nat_gateway" "foo" {
2626

2727
The following arguments are supported:
2828

29-
* `name` - (Required) Name of the NAT gateway.
30-
* `vpc_id` - (Required, ForceNew) Id of the VPC.
29+
* `name` - (Required) Name of the nat gateway.
30+
* `vpc_id` - (Required, ForceNew) ID of the vpc.
3131
* `assigned_eip_set` - (Optional) EIP arrays bound to the gateway. The value of at least 1.
3232
* `bandwidth` - (Optional) The maximum public network output bandwidth of nat gateway (unit: Mbps), the available values include: 20,50,100,200,500,1000,2000,5000. Default is 100.
3333
* `max_concurrent` - (Optional) The upper limit of concurrent connection of nat gateway, the available values include: 1000000,3000000,10000000. Default is 1000000.

website/docs/r/vpn_connection.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ The following arguments are supported:
6868
* `ike_version` - (Optional) Version of the IKE operation specification. Default value is `IKEV1`.
6969
* `ipsec_encrypt_algorithm` - (Optional) Encrypt algorithm of the IPSEC operation specification, valid values are `3DES-CBC`, `AES-CBC-128`, `AES-CBC-128`, `AES-CBC-256`, `DES-CBC`. Default value is `3DES-CBC`.
7070
* `ipsec_integrity_algorithm` - (Optional) Integrity algorithm of the IPSEC operation specification, valid values are `SHA1`, `MD5`. Default value is `MD5`.
71-
* `ipsec_pfs_dh_group` - (Optional) PFS DH group , valid values are `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
71+
* `ipsec_pfs_dh_group` - (Optional) PFS DH group, valid values are `GROUP1`, `GROUP2`, `GROUP5`, `GROUP14`, `GROUP24`, `NULL`. Default value is `NULL`.
7272
* `ipsec_sa_lifetime_seconds` - (Optional) SA lifetime of the IPSEC operation specification, unit is `second`. The value ranges from 180 to 604800. Default value is 3600 seconds.
73-
* `ipsec_sa_lifetime_traffic` - (Optional) SA lifetime of the IPSEC operation specification, unit is `KB`. The value ranges from 2560 to 4294967295. Default value is 1843200.
73+
* `ipsec_sa_lifetime_traffic` - (Optional) SA lifetime of the IPSEC operation specification, unit is `KB`. The value should not be less then 2560. Default value is 1843200.
7474
* `tags` - (Optional) A list of tags used to associate different resources.
7575

7676
The `security_group_policy` object supports the following:

0 commit comments

Comments
 (0)