Skip to content

Commit 11f7bbf

Browse files
authored
Merge pull request #1 from terraform-providers/master
u
2 parents da9c8f6 + 2fd2822 commit 11f7bbf

28 files changed

+891
-123
lines changed

CHANGELOG.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
## 1.33.1 (Unreleased)
22

33
ENHANCEMENTS:
4-
Resource: `tencentcloud_redis_instance` add new argument `type_id`,`redis_shard_num`,`redis_replicas_num`
5-
Data Source: `tencentcloud_redis_instances` add new argument `type_id`,`redis_shard_num`,`redis_replicas_num`
6-
Data Source: `tencentcloud_redis_zone_config` add output argument `type_id` and new output argument `type_id`,`redis_shard_nums`,`redis_replicas_nums`
4+
5+
* Data Source: `tencentcloud_redis_instances` add new argument `type_id`, `redis_shard_num`, `redis_replicas_num`
6+
* Data Source: `tencentcloud_redis_zone_config` add output argument `type_id` and new output argument `type_id`, `redis_shard_nums`, `redis_replicas_nums`
7+
* Data Source: `tencentcloud_ccn_instances` add new type `VPNGW` for field `instance_type`
8+
* Data Source: `tencentcloud_vpn_gateways` add new type `CCN` for field `type`
9+
* Resource: `tencentcloud_redis_instance` add new argument `type_id`, `redis_shard_num`, `redis_replicas_num`
10+
* Resource: `tencentcloud_ccn_attachment` add new type `CNN_INSTANCE_TYPE_VPNGW` for field `instance_type`
11+
* Resource: `tencentcloud_vpn_gateway` add new type `CCN` for field `type`
12+
13+
BUG FIXES:
14+
15+
* Resource: `tencentcloud_cdn_domain` fix `https_config` inconsistency after apply([#413](https://github.com/terraform-providers/terraform-provider-tencentcloud/issues/413)).
716

817
DEPRECATED:
18+
919
* Resource: `tencentcloud_redis_instance`: optional argument `type` is no longer supported, replace by `type_id`.
10-
* Data Source: `tencentcloud_redis_instances`: output argument `type` is no longer supported, replace by `type_id`
11-
* Data Source: `tencentcloud_redis_zone_config`: output argument `type` is no longer supported, replace by `type_id`
20+
* Data Source: `tencentcloud_redis_instances`: output argument `type` is no longer supported, replace by `type_id`.
21+
* Data Source: `tencentcloud_redis_zone_config`: output argument `type` is no longer supported, replace by `type_id`.
1222

1323
## 1.33.0 (May 18, 2020)
1424

examples/tencentcloud-ccn/main.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,28 @@ resource tencentcloud_ccn_bandwidth_limit limit1 {
3737
region = var.other_region
3838
bandwidth_limit = 500
3939
}
40+
41+
resource tencentcloud_vpn_gateway ccn_vpngw {
42+
name = "ci-temp-ccn-vpngw"
43+
vpc_id = ""
44+
bandwidth = 5
45+
zone = var.availability_zone
46+
type = "CCN"
47+
48+
tags = {
49+
test = "ccn-vpngw-test"
50+
}
51+
}
52+
53+
resource tencentcloud_ccn vpngw_ccn_main {
54+
name = "ci-temp-test-vpngw-ccn"
55+
description = "ci-temp-test-vpngw-ccn-des"
56+
qos = "AG"
57+
}
58+
59+
resource tencentcloud_ccn_attachment vpngw_ccn_attachment {
60+
ccn_id = tencentcloud_ccn.vpngw_ccn_main.id
61+
instance_type = "VPNGW"
62+
instance_id = tencentcloud_vpn_gateway.ccn_vpngw.id
63+
instance_region = var.region
64+
}

examples/tencentcloud-ccn/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ variable "region" {
55
variable "other_region" {
66
default = "ap-shanghai"
77
}
8+
9+
variable "availability_zone" {
10+
default = "ap-guangzhou-3"
11+
}

examples/tencentcloud-vpn/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,17 @@ data "tencentcloud_vpn_gateways" "example" {
6363
data "tencentcloud_vpn_connections" "example" {
6464
id = tencentcloud_vpn_connection.example.id
6565
}
66+
67+
# The example below shows how to create a vpng gateway in ccn type if it is needed. Then could be used when creating
68+
# vpn tunnel in the usual way.
69+
resource tencentcloud_vpn_gateway ccn_vpngw_example {
70+
name = "ccn-vpngw-example"
71+
vpc_id = ""
72+
bandwidth = 5
73+
zone = var.availability_zone
74+
type = "CCN"
75+
76+
tags = {
77+
test = "ccn-vpngw-example"
78+
}
79+
}

tencentcloud/connectivity/client.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ func NewTencentCloudClient(secretId, secretKey, securityToken, region string) *T
7272
}
7373
}
7474

75-
// newTencentCloudClientProfile returns a new ClientProfile
76-
func newTencentCloudClientProfile(timeout int) *profile.ClientProfile {
75+
// NewTencentCloudClientProfile returns a new ClientProfile
76+
func NewTencentCloudClientProfile(timeout int) *profile.ClientProfile {
7777
cpf := profile.NewClientProfile()
7878

7979
// all request use method POST
@@ -118,7 +118,7 @@ func (me *TencentCloudClient) UseMysqlClient() *cdb.Client {
118118
return me.mysqlConn
119119
}
120120

121-
cpf := newTencentCloudClientProfile(300)
121+
cpf := NewTencentCloudClientProfile(300)
122122
me.mysqlConn, _ = cdb.NewClient(me.Credential, me.Region, cpf)
123123
me.mysqlConn.WithHttpTransport(&LogRoundTripper{})
124124

@@ -131,7 +131,7 @@ func (me *TencentCloudClient) UseRedisClient() *redis.Client {
131131
return me.redisConn
132132
}
133133

134-
cpf := newTencentCloudClientProfile(300)
134+
cpf := NewTencentCloudClientProfile(300)
135135
me.redisConn, _ = redis.NewClient(me.Credential, me.Region, cpf)
136136
me.redisConn.WithHttpTransport(&LogRoundTripper{})
137137

@@ -144,7 +144,7 @@ func (me *TencentCloudClient) UseAsClient() *as.Client {
144144
return me.asConn
145145
}
146146

147-
cpf := newTencentCloudClientProfile(300)
147+
cpf := NewTencentCloudClientProfile(300)
148148
me.asConn, _ = as.NewClient(me.Credential, me.Region, cpf)
149149
me.asConn.WithHttpTransport(&LogRoundTripper{})
150150

@@ -157,7 +157,7 @@ func (me *TencentCloudClient) UseVpcClient() *vpc.Client {
157157
return me.vpcConn
158158
}
159159

160-
cpf := newTencentCloudClientProfile(300)
160+
cpf := NewTencentCloudClientProfile(300)
161161
me.vpcConn, _ = vpc.NewClient(me.Credential, me.Region, cpf)
162162
me.vpcConn.WithHttpTransport(&LogRoundTripper{})
163163

@@ -170,7 +170,7 @@ func (me *TencentCloudClient) UseCbsClient() *cbs.Client {
170170
return me.cbsConn
171171
}
172172

173-
cpf := newTencentCloudClientProfile(300)
173+
cpf := NewTencentCloudClientProfile(300)
174174
me.cbsConn, _ = cbs.NewClient(me.Credential, me.Region, cpf)
175175
me.cbsConn.WithHttpTransport(&LogRoundTripper{})
176176

@@ -183,7 +183,7 @@ func (me *TencentCloudClient) UseDcClient() *dc.Client {
183183
return me.dcConn
184184
}
185185

186-
cpf := newTencentCloudClientProfile(300)
186+
cpf := NewTencentCloudClientProfile(300)
187187
me.dcConn, _ = dc.NewClient(me.Credential, me.Region, cpf)
188188
me.dcConn.WithHttpTransport(&LogRoundTripper{})
189189

@@ -196,7 +196,7 @@ func (me *TencentCloudClient) UseMongodbClient() *mongodb.Client {
196196
return me.mongodbConn
197197
}
198198

199-
cpf := newTencentCloudClientProfile(300)
199+
cpf := NewTencentCloudClientProfile(300)
200200
me.mongodbConn, _ = mongodb.NewClient(me.Credential, me.Region, cpf)
201201
me.mongodbConn.WithHttpTransport(&LogRoundTripper{})
202202

@@ -209,7 +209,7 @@ func (me *TencentCloudClient) UseClbClient() *clb.Client {
209209
return me.clbConn
210210
}
211211

212-
cpf := newTencentCloudClientProfile(300)
212+
cpf := NewTencentCloudClientProfile(300)
213213
me.clbConn, _ = clb.NewClient(me.Credential, me.Region, cpf)
214214
me.clbConn.WithHttpTransport(&LogRoundTripper{})
215215

@@ -222,7 +222,7 @@ func (me *TencentCloudClient) UseCvmClient() *cvm.Client {
222222
return me.cvmConn
223223
}
224224

225-
cpf := newTencentCloudClientProfile(300)
225+
cpf := NewTencentCloudClientProfile(300)
226226
me.cvmConn, _ = cvm.NewClient(me.Credential, me.Region, cpf)
227227
me.cvmConn.WithHttpTransport(&LogRoundTripper{})
228228

@@ -235,7 +235,7 @@ func (me *TencentCloudClient) UseTagClient() *tag.Client {
235235
return me.tagConn
236236
}
237237

238-
cpf := newTencentCloudClientProfile(300)
238+
cpf := NewTencentCloudClientProfile(300)
239239
me.tagConn, _ = tag.NewClient(me.Credential, me.Region, cpf)
240240
me.tagConn.WithHttpTransport(&LogRoundTripper{})
241241

@@ -248,7 +248,7 @@ func (me *TencentCloudClient) UseTkeClient() *tke.Client {
248248
return me.tkeConn
249249
}
250250

251-
cpf := newTencentCloudClientProfile(300)
251+
cpf := NewTencentCloudClientProfile(300)
252252
me.tkeConn, _ = tke.NewClient(me.Credential, me.Region, cpf)
253253
me.tkeConn.WithHttpTransport(&LogRoundTripper{})
254254

@@ -261,7 +261,7 @@ func (me *TencentCloudClient) UseGaapClient() *gaap.Client {
261261
return me.gaapConn
262262
}
263263

264-
cpf := newTencentCloudClientProfile(300)
264+
cpf := NewTencentCloudClientProfile(300)
265265
me.gaapConn, _ = gaap.NewClient(me.Credential, me.Region, cpf)
266266
me.gaapConn.WithHttpTransport(&LogRoundTripper{})
267267

@@ -274,7 +274,7 @@ func (me *TencentCloudClient) UseSslClient() *ssl.Client {
274274
return me.sslConn
275275
}
276276

277-
cpf := newTencentCloudClientProfile(300)
277+
cpf := NewTencentCloudClientProfile(300)
278278
me.sslConn, _ = ssl.NewClient(me.Credential, me.Region, cpf)
279279
me.sslConn.WithHttpTransport(&LogRoundTripper{})
280280

@@ -287,7 +287,7 @@ func (me *TencentCloudClient) UseCamClient() *cam.Client {
287287
return me.camConn
288288
}
289289

290-
cpf := newTencentCloudClientProfile(300)
290+
cpf := NewTencentCloudClientProfile(300)
291291
me.camConn, _ = cam.NewClient(me.Credential, me.Region, cpf)
292292
me.camConn.WithHttpTransport(&LogRoundTripper{})
293293

@@ -300,7 +300,7 @@ func (me *TencentCloudClient) UseCfsClient() *cfs.Client {
300300
return me.cfsConn
301301
}
302302

303-
cpf := newTencentCloudClientProfile(300)
303+
cpf := NewTencentCloudClientProfile(300)
304304
me.cfsConn, _ = cfs.NewClient(me.Credential, me.Region, cpf)
305305
me.cfsConn.WithHttpTransport(&LogRoundTripper{})
306306

@@ -313,7 +313,7 @@ func (me *TencentCloudClient) UseScfClient() *scf.Client {
313313
return me.scfConn
314314
}
315315

316-
cpf := newTencentCloudClientProfile(300)
316+
cpf := NewTencentCloudClientProfile(300)
317317
me.scfConn, _ = scf.NewClient(me.Credential, me.Region, cpf)
318318
me.scfConn.WithHttpTransport(&LogRoundTripper{})
319319

@@ -326,7 +326,7 @@ func (me *TencentCloudClient) UseTcaplusClient() *tcaplusdb.Client {
326326
return me.tcaplusConn
327327
}
328328

329-
cpf := newTencentCloudClientProfile(300)
329+
cpf := NewTencentCloudClientProfile(300)
330330
me.tcaplusConn, _ = tcaplusdb.NewClient(me.Credential, me.Region, cpf)
331331
me.tcaplusConn.WithHttpTransport(&LogRoundTripper{})
332332

@@ -339,7 +339,7 @@ func (me *TencentCloudClient) UseDayuClient() *dayu.Client {
339339
return me.dayuConn
340340
}
341341

342-
cpf := newTencentCloudClientProfile(300)
342+
cpf := NewTencentCloudClientProfile(300)
343343
me.dayuConn, _ = dayu.NewClient(me.Credential, me.Region, cpf)
344344
me.dayuConn.WithHttpTransport(&LogRoundTripper{})
345345

@@ -352,7 +352,7 @@ func (me *TencentCloudClient) UseCdnClient() *cdn.Client {
352352
return me.cdnConn
353353
}
354354

355-
cpf := newTencentCloudClientProfile(300)
355+
cpf := NewTencentCloudClientProfile(300)
356356
me.cdnConn, _ = cdn.NewClient(me.Credential, me.Region, cpf)
357357
me.cdnConn.WithHttpTransport(&LogRoundTripper{})
358358

@@ -365,7 +365,7 @@ func (me *TencentCloudClient) UseMonitorClient() *monitor.Client {
365365
return me.monitorConn
366366
}
367367

368-
cpf := newTencentCloudClientProfile(300)
368+
cpf := NewTencentCloudClientProfile(300)
369369
me.monitorConn, _ = monitor.NewClient(me.Credential, me.Region, cpf)
370370
me.monitorConn.WithHttpTransport(&LogRoundTripper{})
371371

tencentcloud/data_source_tc_ccn_instances.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func dataSourceTencentCloudCcnInstances() *schema.Resource {
9393
"instance_type": {
9494
Type: schema.TypeString,
9595
Computed: true,
96-
Description: "Type of attached instance network, and available values include VPC, DIRECTCONNECT and BMVPC.",
96+
Description: "Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.",
9797
},
9898
"instance_region": {
9999
Type: schema.TypeString,

tencentcloud/data_source_tc_vpn_gateways.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func dataSourceTencentCloudVpnGateways() *schema.Resource {
107107
"type": {
108108
Type: schema.TypeString,
109109
Computed: true,
110-
Description: "Type of gateway instance, valid values are `IPSEC`, `SSL`.",
110+
Description: "Type of gateway instance, valid values are `IPSEC`, `SSL` and `CCN`.",
111111
},
112112
"state": {
113113
Type: schema.TypeString,

tencentcloud/extension_cdn.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ const (
2929
CDN_SERVICE_NAME = "cdn"
3030
CDN_RESOURCE_NAME_DOMAIN = "domain"
3131

32-
CDN_HOST_NOT_FOUND = "ResourceNotFound.CdnHostNotExists"
32+
CDN_HOST_NOT_FOUND = "ResourceNotFound.CdnHostNotExists"
33+
CDN_DOMAIN_CONFIG_ERROE = "FailedOperation.CdnConfigError"
3334
)
3435

3536
var CDN_SERVICE_TYPE = []string{

tencentcloud/extension_cnn.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ const CNN_QOS_AG = "AG"
77
const CNN_INSTANCE_TYPE_VPC = "VPC"
88
const CNN_INSTANCE_TYPE_DIRECTCONNECT = "DIRECTCONNECT"
99
const CNN_INSTANCE_TYPE_BMVPC = "BMVPC"
10+
const CNN_INSTANCE_TYPE_VPNGW = "VPNGW"

0 commit comments

Comments
 (0)