File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ class InstanceRefreshInProgress(LambdaError):
26
26
LOGGING_LEVEL = environ .get ('LOGGING_LEVEL' , logging .INFO )
27
27
REFRESH_INSTANCE_WARMUP = int (environ ['REFRESH_INSTANCE_WARMUP' ])
28
28
REFRESH_MIN_HEALTHY_PERCENTAGE = int (environ ['REFRESH_MIN_HEALTHY_PERCENTAGE' ])
29
+ REFRESH_SKIP_MATCHING = bool (environ ['REFRESH_SKIP_MATCHING' ])
29
30
SENTRY_DSN = environ .get ('SENTRY_DSN' )
30
31
SSM_PARAMETER_NAME = environ ['SSM_PARAMETER_NAME' ]
31
32
UPDATE_MIXED_INSTANCES_POLICY_OVERRIDEN_LAUNCH_TEMPLATES = bool (environ ['UPDATE_MIXED_OVERRIDE_LAUNCH_TEMPLATES' ])
@@ -163,6 +164,7 @@ def start_instance_refresh():
163
164
Preferences = {
164
165
'InstanceWarmup' : REFRESH_INSTANCE_WARMUP ,
165
166
'MinHealthyPercentage' : REFRESH_MIN_HEALTHY_PERCENTAGE ,
167
+ 'SkipMatching' : REFRESH_SKIP_MATCHING ,
166
168
},
167
169
)
168
170
except autoscaling .exceptions .InstanceRefreshInProgressFault as ex :
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ resource "aws_lambda_function" "refresh" {
26
26
DESCRIBE_INSTANCE_REFRESHES_MAX_RECORDS = var.describe_instance_refreshes_max_records
27
27
REFRESH_INSTANCE_WARMUP = var.instance_refresh_instance_warmup
28
28
REFRESH_MIN_HEALTHY_PERCENTAGE = var.instance_refresh_min_healthy_percentage
29
+ REFRESH_SKIP_MATCHING = var.instance_refresh_skip_matching ? " True" : " False"
29
30
SENTRY_DSN = var.sentry_dsn
30
31
SENTRY_ENVIRONMENT = var.sentry_environment
31
32
SSM_PARAMETER_NAME = var.ami_ssm_parameter
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ variable "instance_refresh_min_healthy_percentage" {
39
39
type = number
40
40
}
41
41
42
+ variable "instance_refresh_skip_matching" {
43
+ description = " Skip matching instances for instance refresh"
44
+ default = false
45
+ type = bool
46
+ }
47
+
42
48
variable "launch_template_version_description" {
43
49
description = " Description of the new launch template version in Python's f-string format"
44
50
default = " Automated AMI refresh to \" {image_id}\" "
You can’t perform that action at this time.
0 commit comments