diff --git a/alicloud/resource_alicloud_ess_scaling_configuration.go b/alicloud/resource_alicloud_ess_scaling_configuration.go index 72843c70c8d6..ad91ac29ad84 100644 --- a/alicloud/resource_alicloud_ess_scaling_configuration.go +++ b/alicloud/resource_alicloud_ess_scaling_configuration.go @@ -214,6 +214,20 @@ func resourceAlicloudEssScalingConfiguration() *schema.Resource { ForceNew: true, ValidateFunc: StringInSlice([]string{"Active", "Deactive"}, false), }, + "security_options": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "confidential_computing_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + }, + }, "system_disk_size": { Type: schema.TypeInt, Optional: true, @@ -581,6 +595,16 @@ func resourceAliyunEssScalingConfigurationCreate(d *schema.ResourceData, meta in request["SecurityEnhancementStrategy"] = v } + if v, ok := d.GetOk("security_options"); ok { + securityOptions := v.(*schema.Set).List() + for _, securityOption := range securityOptions { + securityOptionMap := securityOption.(map[string]interface{}) + if v, ok := securityOptionMap["confidential_computing_mode"]; ok { + request["SecurityOptions.ConfidentialComputingMode"] = v + } + } + } + if v := d.Get("internet_max_bandwidth_in").(int); v != 0 { request["InternetMaxBandwidthIn"] = d.Get("internet_max_bandwidth_in") } @@ -1320,6 +1344,7 @@ func resourceAliyunEssScalingConfigurationRead(d *schema.ResourceData, meta inte } d.Set("system_disk_category", response["SystemDiskCategory"]) d.Set("security_enhancement_strategy", response["SecurityEnhancementStrategy"]) + d.Set("security_options", response["SecurityOptions"]) if response["InternetMaxBandwidthIn"] != nil { d.Set("internet_max_bandwidth_in", response["InternetMaxBandwidthIn"]) }