Skip to content

u #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 22, 2020
Merged

u #1

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
## 1.33.1 (Unreleased)

ENHANCEMENTS:
Resource: `tencentcloud_redis_instance` add new argument `type_id`,`redis_shard_num`,`redis_replicas_num`
Data Source: `tencentcloud_redis_instances` add new argument `type_id`,`redis_shard_num`,`redis_replicas_num`
Data Source: `tencentcloud_redis_zone_config` add output argument `type_id` and new output argument `type_id`,`redis_shard_nums`,`redis_replicas_nums`

* Data Source: `tencentcloud_redis_instances` add new argument `type_id`, `redis_shard_num`, `redis_replicas_num`
* Data Source: `tencentcloud_redis_zone_config` add output argument `type_id` and new output argument `type_id`, `redis_shard_nums`, `redis_replicas_nums`
* Data Source: `tencentcloud_ccn_instances` add new type `VPNGW` for field `instance_type`
* Data Source: `tencentcloud_vpn_gateways` add new type `CCN` for field `type`
* Resource: `tencentcloud_redis_instance` add new argument `type_id`, `redis_shard_num`, `redis_replicas_num`
* Resource: `tencentcloud_ccn_attachment` add new type `CNN_INSTANCE_TYPE_VPNGW` for field `instance_type`
* Resource: `tencentcloud_vpn_gateway` add new type `CCN` for field `type`

BUG FIXES:

* Resource: `tencentcloud_cdn_domain` fix `https_config` inconsistency after apply([#413](https://github.com/terraform-providers/terraform-provider-tencentcloud/issues/413)).

DEPRECATED:

* Resource: `tencentcloud_redis_instance`: optional argument `type` is no longer supported, replace by `type_id`.
* Data Source: `tencentcloud_redis_instances`: output argument `type` is no longer supported, replace by `type_id`
* Data Source: `tencentcloud_redis_zone_config`: output argument `type` is no longer supported, replace by `type_id`
* Data Source: `tencentcloud_redis_instances`: output argument `type` is no longer supported, replace by `type_id`.
* Data Source: `tencentcloud_redis_zone_config`: output argument `type` is no longer supported, replace by `type_id`.

## 1.33.0 (May 18, 2020)

Expand Down
25 changes: 25 additions & 0 deletions examples/tencentcloud-ccn/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,28 @@ resource tencentcloud_ccn_bandwidth_limit limit1 {
region = var.other_region
bandwidth_limit = 500
}

resource tencentcloud_vpn_gateway ccn_vpngw {
name = "ci-temp-ccn-vpngw"
vpc_id = ""
bandwidth = 5
zone = var.availability_zone
type = "CCN"

tags = {
test = "ccn-vpngw-test"
}
}

resource tencentcloud_ccn vpngw_ccn_main {
name = "ci-temp-test-vpngw-ccn"
description = "ci-temp-test-vpngw-ccn-des"
qos = "AG"
}

resource tencentcloud_ccn_attachment vpngw_ccn_attachment {
ccn_id = tencentcloud_ccn.vpngw_ccn_main.id
instance_type = "VPNGW"
instance_id = tencentcloud_vpn_gateway.ccn_vpngw.id
instance_region = var.region
}
4 changes: 4 additions & 0 deletions examples/tencentcloud-ccn/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ variable "region" {
variable "other_region" {
default = "ap-shanghai"
}

variable "availability_zone" {
default = "ap-guangzhou-3"
}
14 changes: 14 additions & 0 deletions examples/tencentcloud-vpn/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,17 @@ data "tencentcloud_vpn_gateways" "example" {
data "tencentcloud_vpn_connections" "example" {
id = tencentcloud_vpn_connection.example.id
}

# The example below shows how to create a vpng gateway in ccn type if it is needed. Then could be used when creating
# vpn tunnel in the usual way.
resource tencentcloud_vpn_gateway ccn_vpngw_example {
name = "ccn-vpngw-example"
vpc_id = ""
bandwidth = 5
zone = var.availability_zone
type = "CCN"

tags = {
test = "ccn-vpngw-example"
}
}
44 changes: 22 additions & 22 deletions tencentcloud/connectivity/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func NewTencentCloudClient(secretId, secretKey, securityToken, region string) *T
}
}

// newTencentCloudClientProfile returns a new ClientProfile
func newTencentCloudClientProfile(timeout int) *profile.ClientProfile {
// NewTencentCloudClientProfile returns a new ClientProfile
func NewTencentCloudClientProfile(timeout int) *profile.ClientProfile {
cpf := profile.NewClientProfile()

// all request use method POST
Expand Down Expand Up @@ -118,7 +118,7 @@ func (me *TencentCloudClient) UseMysqlClient() *cdb.Client {
return me.mysqlConn
}

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.mysqlConn, _ = cdb.NewClient(me.Credential, me.Region, cpf)
me.mysqlConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.redisConn, _ = redis.NewClient(me.Credential, me.Region, cpf)
me.redisConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.asConn, _ = as.NewClient(me.Credential, me.Region, cpf)
me.asConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.vpcConn, _ = vpc.NewClient(me.Credential, me.Region, cpf)
me.vpcConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.cbsConn, _ = cbs.NewClient(me.Credential, me.Region, cpf)
me.cbsConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.dcConn, _ = dc.NewClient(me.Credential, me.Region, cpf)
me.dcConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.mongodbConn, _ = mongodb.NewClient(me.Credential, me.Region, cpf)
me.mongodbConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.clbConn, _ = clb.NewClient(me.Credential, me.Region, cpf)
me.clbConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.cvmConn, _ = cvm.NewClient(me.Credential, me.Region, cpf)
me.cvmConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.tagConn, _ = tag.NewClient(me.Credential, me.Region, cpf)
me.tagConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.tkeConn, _ = tke.NewClient(me.Credential, me.Region, cpf)
me.tkeConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.gaapConn, _ = gaap.NewClient(me.Credential, me.Region, cpf)
me.gaapConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.sslConn, _ = ssl.NewClient(me.Credential, me.Region, cpf)
me.sslConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.camConn, _ = cam.NewClient(me.Credential, me.Region, cpf)
me.camConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.cfsConn, _ = cfs.NewClient(me.Credential, me.Region, cpf)
me.cfsConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.scfConn, _ = scf.NewClient(me.Credential, me.Region, cpf)
me.scfConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.tcaplusConn, _ = tcaplusdb.NewClient(me.Credential, me.Region, cpf)
me.tcaplusConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.dayuConn, _ = dayu.NewClient(me.Credential, me.Region, cpf)
me.dayuConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.cdnConn, _ = cdn.NewClient(me.Credential, me.Region, cpf)
me.cdnConn.WithHttpTransport(&LogRoundTripper{})

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

cpf := newTencentCloudClientProfile(300)
cpf := NewTencentCloudClientProfile(300)
me.monitorConn, _ = monitor.NewClient(me.Credential, me.Region, cpf)
me.monitorConn.WithHttpTransport(&LogRoundTripper{})

Expand Down
2 changes: 1 addition & 1 deletion tencentcloud/data_source_tc_ccn_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func dataSourceTencentCloudCcnInstances() *schema.Resource {
"instance_type": {
Type: schema.TypeString,
Computed: true,
Description: "Type of attached instance network, and available values include VPC, DIRECTCONNECT and BMVPC.",
Description: "Type of attached instance network, and available values include VPC, DIRECTCONNECT, BMVPC and VPNGW.",
},
"instance_region": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion tencentcloud/data_source_tc_vpn_gateways.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func dataSourceTencentCloudVpnGateways() *schema.Resource {
"type": {
Type: schema.TypeString,
Computed: true,
Description: "Type of gateway instance, valid values are `IPSEC`, `SSL`.",
Description: "Type of gateway instance, valid values are `IPSEC`, `SSL` and `CCN`.",
},
"state": {
Type: schema.TypeString,
Expand Down
3 changes: 2 additions & 1 deletion tencentcloud/extension_cdn.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const (
CDN_SERVICE_NAME = "cdn"
CDN_RESOURCE_NAME_DOMAIN = "domain"

CDN_HOST_NOT_FOUND = "ResourceNotFound.CdnHostNotExists"
CDN_HOST_NOT_FOUND = "ResourceNotFound.CdnHostNotExists"
CDN_DOMAIN_CONFIG_ERROE = "FailedOperation.CdnConfigError"
)

var CDN_SERVICE_TYPE = []string{
Expand Down
1 change: 1 addition & 0 deletions tencentcloud/extension_cnn.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ const CNN_QOS_AG = "AG"
const CNN_INSTANCE_TYPE_VPC = "VPC"
const CNN_INSTANCE_TYPE_DIRECTCONNECT = "DIRECTCONNECT"
const CNN_INSTANCE_TYPE_BMVPC = "BMVPC"
const CNN_INSTANCE_TYPE_VPNGW = "VPNGW"
Loading