Fix launch template check
This commit is contained in:
parent
2a92f6ee05
commit
825d563d99
@ -13,10 +13,10 @@ def autoscaling_launch_template():
|
||||
asgs = autoscaling_client.describe_auto_scaling_groups()["AutoScalingGroups"]
|
||||
|
||||
for asg in asgs:
|
||||
if "LaunchTemplate" in asg["MixedInstancesPolicy"]:
|
||||
compliant_resources.append(asg["AutoScalingGroupARN"])
|
||||
else:
|
||||
if "LaunchConfigurationName" in asg:
|
||||
non_compliant_resources.append(asg["AutoScalingGroupARN"])
|
||||
else:
|
||||
compliant_resources.append(asg["AutoScalingGroupARN"])
|
||||
|
||||
return RuleCheckResult(
|
||||
passed=not non_compliant_resources,
|
||||
|
Loading…
Reference in New Issue
Block a user