Skip to content

fix(cls): [138805605] moidfy type switch #3255

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 4 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions .changelog/3255.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_cls_config_extra: Fix the problem of failure to modify type.
```
4 changes: 2 additions & 2 deletions tencentcloud/services/cls/resource_tc_cls_config_extra.go
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ func resourceTencentCloudClsConfigExtraUpdate(d *schema.ResourceData, meta inter
request.HostFile = hostFiles[0]
}
}
if d.HasChange("container_file") {
if d.HasChange("container_file") || d.HasChange("type") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没看懂这个修改

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改这两个参数中的一个,要把另一个参数带上

if v, ok := d.GetOk("container_file"); ok {
containerFiles := make([]*cls.ContainerFileInfo, 0, 10)
if len(v.([]interface{})) != 1 {
Expand Down Expand Up @@ -1040,7 +1040,7 @@ func resourceTencentCloudClsConfigExtraUpdate(d *schema.ResourceData, meta inter
request.ContainerFile = containerFiles[0]
}
}
if d.HasChange("container_stdout") {
if d.HasChange("container_stdout") || d.HasChange("type") {
if v, ok := d.GetOk("container_stdout"); ok {
containerStdouts := make([]*cls.ContainerStdoutInfo, 0, 10)
if len(v.([]interface{})) != 1 {
Expand Down
Loading