in src/main/scala/com/gu/ssm/Logic.scala [93:105]
def computeIncorrectInstances(executionTarget: ExecutionTarget, instanceIds: List[InstanceId]): List[InstanceId] =
executionTarget.instances.getOrElse(List()).filterNot(instanceIds.toSet)
def getAddress(instance: Instance, onlyUsePrivateIP: Boolean): Either[FailedAttempt, String] = {
if (onlyUsePrivateIP) {
Right(instance.privateIpAddress)
} else {
instance.publicIpAddressOpt match {
case Some(ipAddress) => Right(ipAddress)
case None => Right(instance.privateIpAddress)
}
}
}