Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

Jan 9, 2025
676d27d · Jan 9, 2025

History

History
63 lines (45 loc) · 3.05 KB

as_start_instance_refresh.html.markdown

File metadata and controls

63 lines (45 loc) · 3.05 KB
subcategory layout page_title sidebar_current description
Auto Scaling(AS)
tencentcloud
TencentCloud: tencentcloud_as_start_instance_refresh
docs-tencentcloud-resource-as_start_instance_refresh
Provides a resource to create as instance refresh

tencentcloud_as_start_instance_refresh

Provides a resource to create as instance refresh

Example Usage

resource "tencentcloud_as_start_instance_refresh" "example" {
  auto_scaling_group_id = "asg-8n7fdm28"
  refresh_mode          = "ROLLING_UPDATE_RESET"
  refresh_settings {
    check_instance_target_health = false
    rolling_update_settings {
      batch_number = 1
      batch_pause  = "AUTOMATIC"
      max_surge    = 1
      fail_process = "AUTO_PAUSE"
    }
  }

  timeouts {
    create = "10m"
  }
}

Argument Reference

The following arguments are supported:

  • auto_scaling_group_id - (Required, String, ForceNew) Scaling group ID.
  • refresh_settings - (Required, List, ForceNew) Refresh settings.
  • refresh_mode - (Optional, String, ForceNew) Refresh mode, currently, only rolling updates are supported, with the default value being ROLLING_UPDATE_RESET.

The refresh_settings object supports the following:

  • rolling_update_settings - (Required, List) Rolling update settings parameters. RefreshMode is the rolling update. This parameter must be filled in.Note: This field may return null, indicating that no valid value can be obtained.
  • check_instance_target_health - (Optional, Bool) Backend service health check status for instances, defaults to FALSE. This setting takes effect only for scaling groups bound with application load balancers. When enabled, if an instance fails the check after being refreshed, its load balancer port weight remains 0 and is marked as a refresh failure. Valid values:
  • TRUE: Enable the check.
  • FALSE: Do not enable the check.

The rolling_update_settings object of refresh_settings supports the following:

  • batch_number - (Required, Int) Batch quantity. The batch quantity should be a positive integer greater than 0, but cannot exceed the total number of instances pending refresh.
  • batch_pause - (Optional, String) Pause policy between batches. Default value: Automatic. Valid values:
  • FIRST_BATCH_PAUSE: Pause after the first batch update completes.
  • BATCH_INTERVAL_PAUSE: Pause between each batch update.
  • AUTOMATIC: No pauses.
  • fail_process - (Optional, String) Failure Handling Policy. The default value is AUTO_PAUSE. The values are as follows, AUTO_PAUSE: Pause after refresh fails; AUTO_ROLLBACK: Roll back after refresh fails; AUTO_CANCEL: Cancel after refresh fails.
  • max_surge - (Optional, Int) Maximum Extra Quantity. After setting this parameter, a batch of pay-as-you-go extra instances will be created according to the launch configuration before the rolling update starts, and the extra instances will be destroyed after the rolling update is completed.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - ID of the resource.