Skip to content

Commit

Permalink
Merge pull request #46 from glg/enable_instance_refresh
Browse files Browse the repository at this point in the history
Enable instance_refresh Setting for the ASG
  • Loading branch information
Yantrio authored May 22, 2023
2 parents c593ed6 + 6092ed4 commit dbee049
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .spacelift/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
module_version: 1.5.0
module_version: 1.6.0
tests:
- name: AMD64-based workerpool
project_root: examples/amd64
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ $ make docs
| <a name="input_enable_monitoring"></a> [enable\_monitoring](#input\_enable\_monitoring) | Enables/disables detailed monitoring | `bool` | `true` | no |
| <a name="input_enabled_metrics"></a> [enabled\_metrics](#input\_enabled\_metrics) | List of CloudWatch metrics enabled on the ASG | `list(string)` | <pre>[<br> "GroupDesiredCapacity",<br> "GroupInServiceInstances",<br> "GroupMaxSize",<br> "GroupMinSize",<br> "GroupPendingInstances",<br> "GroupStandbyInstances",<br> "GroupTerminatingInstances",<br> "GroupTotalInstances"<br>]</pre> | no |
| <a name="input_iam_role_arn"></a> [iam\_role\_arn](#input\_iam\_role\_arn) | ARN of an existing IAM to use. Used `when create_iam_role` = `false` | `string` | `null` | no |
| <a name="input_instance_refresh"></a> [instance\_refresh](#input\_instance\_refresh) | If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated based on instance refresh configration. | `any` | `{}` | no |
| <a name="input_max_size"></a> [max\_size](#input\_max\_size) | Maximum number of workers to spin up | `number` | `10` | no |
| <a name="input_min_size"></a> [min\_size](#input\_min\_size) | Minimum numbers of workers to spin up | `number` | `0` | no |
| <a name="input_poweroff_delay"></a> [poweroff\_delay](#input\_poweroff\_delay) | Number of seconds to wait before powering the EC2 instance off after the Spacelift launcher stopped | `number` | `15` | no |
Expand Down
1 change: 1 addition & 0 deletions asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module "asg" {
instance_type = var.ec2_instance_type
security_groups = var.security_groups
enable_monitoring = var.enable_monitoring
instance_refresh = var.instance_refresh

block_device_mappings = [
{
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ variable "enable_monitoring" {
default = true
}

variable "instance_refresh" {
description = "If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated based on instance refresh configration."
type = any
default = {}
}

locals {
namespace = "sp5ft-${var.worker_pool_id}"
}

0 comments on commit dbee049

Please sign in to comment.