diff --git a/config/plugin/launch_config_drift.sh b/config/plugin/launch_config_drift.sh index 05b1c16..e37cb2d 100755 --- a/config/plugin/launch_config_drift.sh +++ b/config/plugin/launch_config_drift.sh @@ -16,7 +16,7 @@ then fi instance="$(echo "${instances}" | jq '.AutoScalingInstances[0]')" -instance_launch_config="$(echo "${instance}" | jq -r .LaunchConfigurationName)" +instance_launch_config="$(echo "${instance}" | jq -r .LaunchTemplate.LaunchTemplateName)" instance_asg="$(echo "${instance}" | jq -r .AutoScalingGroupName)" asgs="$(aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names ${instance_asg})" @@ -26,11 +26,11 @@ then exit $UNKNOWN fi -asg_launch_config="$(echo "${asgs}" | jq -r '.AutoScalingGroups[0].LaunchConfigurationName')" +asg_launch_config="$(echo "${asgs}" | jq -r '.AutoScalingGroups[0].MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification.LaunchTemplateName')" if [ "${instance_launch_config}" = "${asg_launch_config}" ] then exit $OK else exit $NONOK -fi +fi \ No newline at end of file