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"]
|
asgs = autoscaling_client.describe_auto_scaling_groups()["AutoScalingGroups"]
|
||||||
|
|
||||||
for asg in asgs:
|
for asg in asgs:
|
||||||
if "LaunchTemplate" in asg["MixedInstancesPolicy"]:
|
if "LaunchConfigurationName" in asg:
|
||||||
compliant_resources.append(asg["AutoScalingGroupARN"])
|
|
||||||
else:
|
|
||||||
non_compliant_resources.append(asg["AutoScalingGroupARN"])
|
non_compliant_resources.append(asg["AutoScalingGroupARN"])
|
||||||
|
else:
|
||||||
|
compliant_resources.append(asg["AutoScalingGroupARN"])
|
||||||
|
|
||||||
return RuleCheckResult(
|
return RuleCheckResult(
|
||||||
passed=not non_compliant_resources,
|
passed=not non_compliant_resources,
|
||||||
|
Loading…
Reference in New Issue
Block a user