Skip to content

Commit

Permalink
fix(amazon): Fix application name matching in load balancer cache keys (
Browse files Browse the repository at this point in the history
#5041)

This stops the previous behavior where it would match any segment, e.g.: account, region, vpc, type
  • Loading branch information
christopherthielen committed Oct 23, 2020
1 parent 53fcd4c commit 7266739
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class AmazonLoadBalancerProvider implements LoadBalancerProvider<AmazonLoadBalan
}

private static boolean applicationMatcher(String key, String applicationName) {
return key ==~ 'aws:.*:' + applicationName + '-.*' || key ==~ 'aws:.*:' + applicationName || key ==~ 'aws:.*:' + applicationName + ':.*'
// aws:loadBalancers:account:region:loadbalancer-name:vpc:type
return key ==~ 'aws:[^:]*:[^:]*:[^:]*:' + applicationName + '(-[^:]*):'
}

@Override
Expand Down

0 comments on commit 7266739

Please sign in to comment.