diff --git a/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb b/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb index c24e30757c..d8f823446d 100644 --- a/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb +++ b/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb @@ -21,7 +21,7 @@ def parse_arn(arn_string) def _get_cn_subparam(param) tokens = param.split(",") unless param.blank? tokens.each do |token| - return token if token.include? "cn" + return token if token.downcase.start_with? "cn" end "" end