Skip to content

Commit a8a7f37

Browse files
make it a bool
1 parent b13368c commit a8a7f37

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def get_affected_entities(health_client, event_arn, affected_accounts, is_org_mo
457457
# don't list entities which are accounts (handled separately for chat applications)
458458
def get_resources_from_entities(affected_entity_array):
459459
resources = []
460-
filter_resolved = os.environ.get("FILTER_RESOLVED", "no").lower() == "yes"
460+
filter_resolved = os.environ.get("FILTER_RESOLVED", "false") == "true"
461461

462462
for entity in affected_entity_array:
463463
if entity["entityValue"] == "UNKNOWN":

terraform/Terraform_DEPLOY_AHA/Terraform_DEPLOY_AHA.tf

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,9 @@ variable "ExcludeAccountIDs" {
181181
description = "If you would like to EXCLUDE any accounts from alerting, enter a .csv filename created with comma-seperated account numbers. Sample AccountIDs file name: aha_account_ids.csv. If not, leave the default empty."
182182
}
183183
variable "FilterResolvedResources" {
184-
type = string
185-
default = "No"
186-
description = "Whether to filter out resources with resolved status. Set to 'Yes' to filter out resolved resources, 'No' to show all resources."
187-
validation {
188-
condition = (
189-
var.FilterResolvedResources == "Yes" || var.FilterResolvedResources == "No"
190-
)
191-
error_message = "FilterResolvedResources variable can only accept Yes or No as values."
192-
}
184+
type = bool
185+
default = false
186+
description = "Whether to filter out resources with resolved status. Set to true to filter out resolved resources, false to show all resources."
193187
}
194188

195189
##### Resources for AHA Solution created below.

terraform/Terraform_DEPLOY_AHA/terraform.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ EventSearchBack="1"
2424
Regions="all regions"
2525
ManagementAccountRoleArn=""
2626
ExcludeAccountIDs=""
27-
FilterResolvedResources = "No"
27+
FilterResolvedResources=false
2828

2929
# Tags applied to all resources - using module provider. Update them per your requirement.
3030
default_tags = {

0 commit comments

Comments
 (0)