diff --git a/src/main/java/gyro/aws/rds/DbSubnetGroupResource.java b/src/main/java/gyro/aws/rds/DbSubnetGroupResource.java index f0d6e0521..6af17e3d5 100644 --- a/src/main/java/gyro/aws/rds/DbSubnetGroupResource.java +++ b/src/main/java/gyro/aws/rds/DbSubnetGroupResource.java @@ -105,7 +105,7 @@ public List getSubnets() { } return subnets.stream() - .sorted(Comparator.comparing(SubnetResource::getId)) + .sorted(Comparator.comparing(SubnetResource::getName)) .collect(Collectors.toList()); } @@ -117,7 +117,8 @@ public void setSubnets(List subnets) { public void copyFrom(DBSubnetGroup group) { setDescription(group.dbSubnetGroupDescription()); setName(group.dbSubnetGroupName()); - setSubnets(group.subnets().stream().map(s -> findById(SubnetResource.class, s.subnetIdentifier())).collect(Collectors.toList())); + setSubnets(group.subnets().stream().map(s -> findById(SubnetResource.class, s.subnetIdentifier())) + .collect(Collectors.toList())); setArn(group.dbSubnetGroupArn()); }