Conversation
|
How is this different than #120? Can you provide a short description of the problem this change solves? |
|
@brharrington Both #120 and #121 are same. Only differences between these two pull requests are |
| edda.region=us-west-1 | ||
| edda.region=us-east-1 | ||
| edda.aws.assumeRoleArn= | ||
| edda.aws.assumerole.enabled=true |
There was a problem hiding this comment.
shouldn't set this as the default/example
|
|
||
| override def doCrawl()(implicit req: RequestId) = | ||
| backoffRequest { ctx.awsClient.ec2(true).describeAddresses(request).getAddresses.asScala.map( | ||
| item => Record(item.getPublicIp, ctx.beanMapper(item))) }.toSeq ++ (if(assumeRoleEnabled) doNonAssumeCrawl() else Seq.empty[Record]) |
There was a problem hiding this comment.
this logic doesn't look correct, if assumeRoleEnabled == true then doNonAssumeCrawl()?
this structuring is pretty awkward, feels like the conditional should be handled up front or pushed down outside of this context.
There was a problem hiding this comment.
When assumeRoleEnabled = true, two kind of Crawl() is done.
doCrawl()pulls data from account where edda is hosteddoNonAssumeCrawl()pulls data from account of ARN given
Code can be optimized bit more. I shall do it and push back
|
I started trying to review this but I don't think it's a reasonable approach. The AssumeRole functionality shouldn't bleed into every crawl implementation IMO. |
No description provided.