Skip to content

Commit eabd52d

Browse files
authored
Merge branch 'master' into master
2 parents ec8b211 + 223f706 commit eabd52d

File tree

45 files changed

+5230
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5230
-140
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
## 1.53.7 (Unreleased)
2-
## 1.53.6 (March 01, 2021)
1+
## 1.53.8 (Unreleased)
2+
## 1.53.7 (March 09, 2021)
33

44
ENHANCEMENTS:
55

66
* Resource `tencentcloud_kubernetes_node_pool` add `internet_max_bandwidth_out`, `public_ip_assigned` to support internet traffic setting.
77

8+
## 1.53.6 (March 09, 2021)
9+
10+
ENHANCEMENTS:
11+
* Resource `tencentcloud_eip` support `internet_max_bandwidth_out` modification.
12+
* Resource `tencentcloud_kubernetes_cluster` add `hostname` to support node hostname setting.
13+
* Resource `tencentcloud_kubernetes_scale_worker` add `hostname` to support node hostname setting.
14+
815
## 1.53.5 (March 01, 2021)
916

1017
ENHANCEMENTS:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/mattn/go-colorable v0.1.6 // indirect
1616
github.com/mitchellh/go-homedir v1.1.0
1717
github.com/pkg/errors v0.9.1
18-
github.com/tencentcloud/tencentcloud-sdk-go v1.0.88
18+
github.com/tencentcloud/tencentcloud-sdk-go v1.0.112
1919
github.com/yangwenmai/ratelimit v0.0.0-20180104140304-44221c2292e1
2020
github.com/zclconf/go-cty v1.4.2 // indirect
2121
golang.org/x/sys v0.0.0-20200523222454-059865788121 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s
441441
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
442442
github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2 h1:Xr9gkxfOP0KQWXKNqmwe8vEeSUiUj4Rlee9CMVX2ZUQ=
443443
github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM=
444-
github.com/tencentcloud/tencentcloud-sdk-go v1.0.88 h1:PUrfD1dbgh/DC7YMZud27vBgLd6qq2BInHZvBg3vU3U=
445-
github.com/tencentcloud/tencentcloud-sdk-go v1.0.88/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI=
444+
github.com/tencentcloud/tencentcloud-sdk-go v1.0.112 h1:/vDVXeIWSVteNNJULedeWnqrcQxJlMDSQfxdwkc2XgI=
445+
github.com/tencentcloud/tencentcloud-sdk-go v1.0.112/go.mod h1:asUz5BPXxgoPGaRgZaVm1iGcUAuHyYUo1nXqKa83cvI=
446446
github.com/tetafro/godot v0.3.7 h1:+mecr7RKrUKB5UQ1gwqEMn13sDKTyDR8KNIquB9mm+8=
447447
github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0=
448448
github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e h1:RumXZ56IrCj4CL+g1b9OL/oH0QnsF976bC8xQFYUD5Q=

tencentcloud/connectivity/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111
)
1212

13-
const ReqClient = "Terraform-v1.53.5"
13+
const ReqClient = "Terraform-v1.53.6"
1414

1515
type LogRoundTripper struct {
1616
}

tencentcloud/resource_tc_eip.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ func resourceTencentCloudEip() *schema.Resource {
8787
"internet_max_bandwidth_out": {
8888
Type: schema.TypeInt,
8989
Optional: true,
90-
ForceNew: true,
9190
Description: "The bandwidth limit of EIP, unit is Mbps.",
9291
},
9392
"tags": {
@@ -271,6 +270,17 @@ func resourceTencentCloudEipUpdate(d *schema.ResourceData, meta interface{}) err
271270
d.SetPartial("name")
272271
}
273272

273+
if d.HasChange("internet_max_bandwidth_out") {
274+
if v, ok := d.GetOk("internet_max_bandwidth_out"); ok {
275+
bandwidthOut := v.(int)
276+
err := vpcService.ModifyEipBandwidthOut(ctx, eipId, bandwidthOut)
277+
if err != nil {
278+
return err
279+
}
280+
d.SetPartial("internet_max_bandwidth_out")
281+
}
282+
}
283+
274284
if d.HasChange("tags") {
275285
oldTags, newTags := d.GetChange("tags")
276286
replaceTags, deleteTags := diffTags(oldTags.(map[string]interface{}), newTags.(map[string]interface{}))
@@ -282,6 +292,7 @@ func resourceTencentCloudEipUpdate(d *schema.ResourceData, meta interface{}) err
282292
}
283293
d.SetPartial("tags")
284294
}
295+
285296
d.Partial(false)
286297

287298
return resourceTencentCloudEipRead(d, meta)

tencentcloud/resource_tc_kubernetes_cluster.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,15 @@ func TkeCvmCreateInfo() map[string]*schema.Schema {
459459
Optional: true,
460460
Description: "CAM role name authorized to access.",
461461
},
462+
"hostname": {
463+
Type: schema.TypeString,
464+
ForceNew: true,
465+
Optional: true,
466+
Description: "The host name of the attached instance. " +
467+
"Dot (.) and dash (-) cannot be used as the first and last characters of HostName and cannot be used consecutively. " +
468+
"Windows example: The length of the name character is [2, 15], letters (capitalization is not restricted), numbers and dashes (-) are allowed, dots (.) are not supported, and not all numbers are allowed. " +
469+
"Examples of other types (Linux, etc.): The character length is [2, 60], and multiple dots are allowed. There is a segment between the dots. Each segment allows letters (with no limitation on capitalization), numbers and dashes (-).",
470+
},
462471
}
463472
}
464473

@@ -1069,6 +1078,10 @@ func tkeGetCvmRunInstancesPara(dMap map[string]interface{}, meta interface{},
10691078
}
10701079
request.InstanceCount = &count
10711080

1081+
if v, ok := dMap["hostname"]; ok {
1082+
request.HostName = helper.String(v.(string))
1083+
}
1084+
10721085
cvmJson = request.ToJsonString()
10731086

10741087
cvmJson = strings.Replace(cvmJson, `"Password":"",`, "", -1)

tencentcloud/service_tencentcloud_vpc.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,6 +1922,25 @@ func (me *VpcService) ModifyEipName(ctx context.Context, eipId, eipName string)
19221922
return nil
19231923
}
19241924

1925+
func (me *VpcService) ModifyEipBandwidthOut(ctx context.Context, eipId string, bandwidthOut int) error {
1926+
logId := getLogId(ctx)
1927+
request := vpc.NewModifyAddressesBandwidthRequest()
1928+
request.AddressIds = []*string{&eipId}
1929+
request.InternetMaxBandwidthOut = helper.IntInt64(bandwidthOut)
1930+
1931+
ratelimit.Check(request.GetAction())
1932+
response, err := me.client.UseVpcClient().ModifyAddressesBandwidth(request)
1933+
if err != nil {
1934+
log.Printf("[CRITAL]%s api[%s] fail, request body [%s], reason[%s]\n",
1935+
logId, request.GetAction(), request.ToJsonString(), err.Error())
1936+
return err
1937+
}
1938+
log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n",
1939+
logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())
1940+
1941+
return nil
1942+
}
1943+
19251944
func (me *VpcService) DeleteEip(ctx context.Context, eipId string) error {
19261945
logId := getLogId(ctx)
19271946
request := vpc.NewReleaseAddressesRequest()

vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/apigateway/v20180808/client.go

Lines changed: 26 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/apigateway/v20180808/models.go

Lines changed: 164 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)