Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
awstagdeprovision: Tag 20 load balancers (max) per request
The previous implementation silently ignored errors returned by lbToAWSObjects. After inserting some debugging logging and running against our CI account, I saw: DEBU[2018-09-28T21:54:47-07:00] failed to convert to lbObjects: Error fetching tags for load balancers: ValidationError: 1 validation error detected: Value '[ci-op-d7qwcq8r-1d3f3-con, ci-op-d7qwcq8r-1d3f3-ext, ci-op-d7qwcq8r-1d3f3-int, ci-op-274cpi9w-1d3f3-con, ci-op-274cpi9w-1d3f3-ext, ci-op-274cpi9w-1d3f3-int, ci-op-i01107d8-1d3f3-con, ci-op-i01107d8-1d3f3-ext, ci-op-i01107d8-1d3f3-int, ci-op-5c88gcn3-1d3f3-int, ci-op-5c88gcn3-1d3f3-con, ci-op-5c88gcn3-1d3f3-ext, ci-op-pp79f299-1d3f3-con, ci-op-pp79f299-1d3f3-ext, ci-op-pp79f299-1d3f3-int, ci-op-dnflccjn-1d3f3-con, ci-op-dnflccjn-1d3f3-ext, ci-op-dnflccjn-1d3f3-int, ci-op-k94dmy6q-1d3f3-ext, ci-op-k94dmy6q-1d3f3-con, ci-op-k94dmy6q-1d3f3-int, ci-op-px7qd18y-1d3f3-con, ci-op-px7qd18y-1d3f3-ext, ci-op-px7qd18y-1d3f3-int, ci-op-8bx1yb6n-1d3f3-int, ci-op-8bx1yb6n-1d3f3-ext, ci-op-8bx1yb6n-1d3f3-con, ci-op-ms0zyi8r-1d3f3-ext, ci-op-ms0zyi8r-1d3f3-int, ci-op-ms0zyi8r-1d3f3-con, ci-op-w7w2z53b-1d3f3-ext, ci-op-w7w2z53b-1d3f3-con, ci-op-w7w2z53b-1d3f3-int, ci-op-hd2bkkcr-1d3f3-int, ci-op-hd2bkkcr-1d3f3-ext, ci-op-hd2bkkcr-1d3f3-con, ci-op-9jv0t7ib-1d3f3-int, ci-op-9jv0t7ib-1d3f3-con, ci-op-9jv0t7ib-1d3f3-ext, ci-op-kr1g9hr3-1d3f3-int, ci-op-kr1g9hr3-1d3f3-ext, ci-op-kr1g9hr3-1d3f3-con, ci-op-k5bn7vbb-1d3f3-con, ci-op-k5bn7vbb-1d3f3-int, ci-op-k5bn7vbb-1d3f3-ext, ci-op-p6qisqvk-1d3f3-ext, ci-op-p6qisqvk-1d3f3-int, ci-op-y5zj1kvd-1d3f3-int, ci-op-y5zj1kvd-1d3f3-con, ci-op-p6qisqvk-1d3f3-con, ci-op-y5zj1kvd-1d3f3-ext]' at 'loadBalancerNames' failed to satisfy constraint: Member must have length less than or equal to 20 With this commit, I split the load balancers up into groups of 20 (max) when building the list of tagged objects. I also log any errors that crop up. Along these same lines, DescribeLoadBalancers itself is paginated, but the default page size (and also the maximum page size) is 400 [1]. So I'm punting on that for now. [1]: https://docs.aws.amazon.com/sdk-for-go/api/service/elb/#DescribeLoadBalancersInput
- Loading branch information