Skip to content

Commit 816dbf0

Browse files
authored
fix(as): [119957253] tencentcloud_as_scaling_config add enhanced_automation_tools_service params (#2875)
* add * add * add
1 parent 3f57a48 commit 816dbf0

File tree

4 files changed

+57
-30
lines changed

4 files changed

+57
-30
lines changed

.changelog/2875.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_as_scaling_config: Supports `enhanced_automation_tools_service` params.
3+
```

tencentcloud/services/as/resource_tc_as_scaling_config.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ func ResourceTencentCloudAsScalingConfig() *schema.Resource {
193193
Default: true,
194194
Description: "To specify whether to enable cloud monitor service. Default is `TRUE`.",
195195
},
196+
"enhanced_automation_tools_service": {
197+
Type: schema.TypeBool,
198+
Optional: true,
199+
Default: true,
200+
Description: "To specify whether to enable cloud automation tools service. Default is `TRUE`.",
201+
},
196202
"user_data": {
197203
Type: schema.TypeString,
198204
Optional: true,
@@ -383,6 +389,12 @@ func resourceTencentCloudAsScalingConfigCreate(d *schema.ResourceData, meta inte
383389
Enabled: &monitorService,
384390
}
385391
}
392+
if v, ok := d.GetOkExists("enhanced_automation_tools_service"); ok {
393+
automationToolsService := v.(bool)
394+
request.EnhancedService.AutomationToolsService = &as.RunAutomationServiceEnabled{
395+
Enabled: &automationToolsService,
396+
}
397+
}
386398

387399
if v, ok := d.GetOk("user_data"); ok {
388400
request.UserData = helper.String(v.(string))
@@ -532,6 +544,7 @@ func resourceTencentCloudAsScalingConfigRead(d *schema.ResourceData, meta interf
532544
_ = d.Set("security_group_ids", helper.StringsInterfaces(config.SecurityGroupIds))
533545
_ = d.Set("enhanced_security_service", *config.EnhancedService.SecurityService.Enabled)
534546
_ = d.Set("enhanced_monitor_service", *config.EnhancedService.MonitorService.Enabled)
547+
_ = d.Set("enhanced_automation_tools_service", *config.EnhancedService.AutomationToolsService.Enabled)
535548
_ = d.Set("user_data", helper.PString(config.UserData))
536549
_ = d.Set("instance_tags", flattenInstanceTagsMapping(config.InstanceTags))
537550
_ = d.Set("disk_type_policy", *config.DiskTypePolicy)
@@ -687,7 +700,7 @@ func resourceTencentCloudAsScalingConfigUpdate(d *schema.ResourceData, meta inte
687700
}
688701
}
689702

690-
if d.HasChange("enhanced_security_service") || d.HasChange("enhanced_monitor_service") {
703+
if d.HasChange("enhanced_security_service") || d.HasChange("enhanced_monitor_service") || d.HasChange("enhanced_automation_tools_service") {
691704
request.EnhancedService = &as.EnhancedService{}
692705

693706
if v, ok := d.GetOkExists("enhanced_security_service"); ok {
@@ -702,6 +715,12 @@ func resourceTencentCloudAsScalingConfigUpdate(d *schema.ResourceData, meta inte
702715
Enabled: &monitorService,
703716
}
704717
}
718+
if v, ok := d.GetOkExists("enhanced_automation_tools_service"); ok {
719+
automationToolsService := v.(bool)
720+
request.EnhancedService.AutomationToolsService = &as.RunAutomationServiceEnabled{
721+
Enabled: &automationToolsService,
722+
}
723+
}
705724
}
706725

707726
if d.HasChange("user_data") {

tencentcloud/services/as/resource_tc_as_scaling_config.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ resource "tencentcloud_as_scaling_config" "example" {
2323
disk_size = 50
2424
}
2525
26-
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
27-
internet_max_bandwidth_out = 10
28-
public_ip_assigned = true
29-
password = "Test@123#"
30-
enhanced_security_service = false
31-
enhanced_monitor_service = false
32-
user_data = "dGVzdA=="
26+
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
27+
internet_max_bandwidth_out = 10
28+
public_ip_assigned = true
29+
password = "Test@123#"
30+
enhanced_security_service = false
31+
enhanced_monitor_service = false
32+
enhanced_automation_tools_service = false
33+
user_data = "dGVzdA=="
3334
3435
host_name_settings {
35-
host_name = "host-name-test"
36-
host_name_style = "UNIQUE"
36+
host_name = "host-name-test"
37+
host_name_style = "UNIQUE"
3738
}
3839
3940
instance_tags = {
@@ -44,7 +45,7 @@ resource "tencentcloud_as_scaling_config" "example" {
4445

4546
Using `SPOTPAID` charge type
4647

47-
```
48+
```hcl
4849
data "tencentcloud_images" "example" {
4950
image_type = ["PUBLIC_IMAGE"]
5051
os_name = "TencentOS Server 3.2 (Final)"
@@ -62,13 +63,14 @@ resource "tencentcloud_as_scaling_config" "example" {
6263

6364
Using image family
6465

65-
```
66+
```hcl
6667
resource "tencentcloud_as_scaling_config" "example" {
67-
image_family = "business-daily-update"
68-
configuration_name = "as-test-config"
69-
disk_type_policy = "ORIGINAL"
70-
enhanced_monitor_service = false
71-
enhanced_security_service = false
68+
image_family = "business-daily-update"
69+
configuration_name = "as-test-config"
70+
disk_type_policy = "ORIGINAL"
71+
enhanced_monitor_service = false
72+
enhanced_security_service = false
73+
enhanced_automation_tools_service = false
7274
instance_tags = {}
7375
instance_types = [
7476
"S5.SMALL2",

website/docs/r/as_scaling_config.html.markdown

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ resource "tencentcloud_as_scaling_config" "example" {
3434
disk_size = 50
3535
}
3636
37-
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
38-
internet_max_bandwidth_out = 10
39-
public_ip_assigned = true
40-
password = "Test@123#"
41-
enhanced_security_service = false
42-
enhanced_monitor_service = false
43-
user_data = "dGVzdA=="
37+
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
38+
internet_max_bandwidth_out = 10
39+
public_ip_assigned = true
40+
password = "Test@123#"
41+
enhanced_security_service = false
42+
enhanced_monitor_service = false
43+
enhanced_automation_tools_service = false
44+
user_data = "dGVzdA=="
4445
4546
host_name_settings {
4647
host_name = "host-name-test"
@@ -75,12 +76,13 @@ resource "tencentcloud_as_scaling_config" "example" {
7576

7677
```hcl
7778
resource "tencentcloud_as_scaling_config" "example" {
78-
image_family = "business-daily-update"
79-
configuration_name = "as-test-config"
80-
disk_type_policy = "ORIGINAL"
81-
enhanced_monitor_service = false
82-
enhanced_security_service = false
83-
instance_tags = {}
79+
image_family = "business-daily-update"
80+
configuration_name = "as-test-config"
81+
disk_type_policy = "ORIGINAL"
82+
enhanced_monitor_service = false
83+
enhanced_security_service = false
84+
enhanced_automation_tools_service = false
85+
instance_tags = {}
8486
instance_types = [
8587
"S5.SMALL2",
8688
]
@@ -106,6 +108,7 @@ The following arguments are supported:
106108
* `cam_role_name` - (Optional, String) CAM role name authorized to access.
107109
* `data_disk` - (Optional, List) Configurations of data disk.
108110
* `disk_type_policy` - (Optional, String) Policy of cloud disk type. Valid values: `ORIGINAL` and `AUTOMATIC`. Default is `ORIGINAL`.
111+
* `enhanced_automation_tools_service` - (Optional, Bool) To specify whether to enable cloud automation tools service. Default is `TRUE`.
109112
* `enhanced_monitor_service` - (Optional, Bool) To specify whether to enable cloud monitor service. Default is `TRUE`.
110113
* `enhanced_security_service` - (Optional, Bool) To specify whether to enable cloud security service. Default is `TRUE`.
111114
* `host_name_settings` - (Optional, List) Related settings of the cloud server hostname (HostName).

0 commit comments

Comments
 (0)