Skip to content

Commit

Permalink
resource/alicloud_instance: remove default value for system_disk_cate…
Browse files Browse the repository at this point in the history
…gory.
  • Loading branch information
ChenHanZhang committed Mar 15, 2024
1 parent 57952c4 commit 065b296
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion alicloud/resource_alicloud_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ func resourceAliCloudInstanceCreate(d *schema.ResourceData, meta interface{}) er
request["SystemDisk.PerformanceLevel"] = v
}

request["SystemDisk.Category"] = "cloud_efficiency"
if v, ok := d.GetOk("system_disk_category"); ok {
request["SystemDisk.Category"] = v
}
Expand Down
23 changes: 11 additions & 12 deletions alicloud/resource_alicloud_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1587,16 +1587,16 @@ func TestAccAliCloudECSInstanceTypeUpdate(t *testing.T) {
// }),
// ),
//},
{
Config: testAccConfig(map[string]interface{}{
"instance_type": "${data.alicloud_instance_types.new4.instance_types.0.id}",
}),
Check: resource.ComposeTestCheckFunc(
testAccCheck(map[string]string{
"instance_type": CHECKSET,
}),
),
},
//{
// Config: testAccConfig(map[string]interface{}{
// "instance_type": "${data.alicloud_instance_types.new4.instance_types.0.id}",
// }),
// Check: resource.ComposeTestCheckFunc(
// testAccCheck(map[string]string{
// "instance_type": CHECKSET,
// }),
// ),
//},
},
})
}
Expand Down Expand Up @@ -3683,7 +3683,6 @@ func TestAccAliCloudECSInstance_LaunchTemplate(t *testing.T) {
func resourceInstanceDedicatedHostIdConfigDependence(name string) string {
return fmt.Sprintf(`
data "alicloud_instance_types" "default" {
cpu_core_count = 2
instance_type_family = "ecs.g6"
availability_zone = alicloud_vswitch.default.zone_id
}
Expand All @@ -3705,7 +3704,7 @@ resource "alicloud_vpc" "default" {
resource "alicloud_vswitch" "default" {
vpc_id = alicloud_vpc.default.id
cidr_block = cidrsubnet(alicloud_vpc.default.cidr_block, 8, 2)
zone_id = data.alicloud_zones.default.zones.0.id
zone_id = data.alicloud_zones.default.zones.1.id
vswitch_name = var.name
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The following arguments are supported:
* `instance_name` - (Optional) The name of the ECS. This instance_name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin with a hyphen, and must not begin with http:// or https://. If not specified,
Terraform will autogenerate a default name is `ECS-Instance`.
* `allocate_public_ip` - (Deprecated) It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance.
* `system_disk_category` - (Optional, ForceNew) Valid values are `ephemeral_ssd`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`, `cloud_auto`, `cloud_essd_entry`. only is used to some none I/O optimized instance. Default to `cloud_efficiency`. Valid values `cloud_auto` Available since 1.184.0+.
* `system_disk_category` - (Optional, ForceNew) Valid values are `ephemeral_ssd`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`, `cloud_auto`, `cloud_essd_entry`. only is used to some none I/O optimized instance. Valid values `cloud_auto` Available since 1.184.0+.
* `system_disk_name` - (Optional, Available since 1.101.0) The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
* `system_disk_description` - (Optional, Available since 1.101.0) The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
* `system_disk_size` - (Optional) Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
Expand Down

0 comments on commit 065b296

Please sign in to comment.