def wait_for_new_security_group
      old_group_name = @config['rds_security_group']
      update_status "Applying security group #{old_group_name}"+
        " to #{@new_instance.id}"
      @new_instance.wait_for {
        new_group = (db_security_groups.select do |group|
          group['DBSecurityGroupName'] == old_group_name
        end).first
        (new_group ? new_group['Status'] : 'Unknown') == 'active'
      }
    end
def wait_for_new_security_group
      old_group_name = @config['rds_security_group']
      update_status "Applying security group #{old_group_name}"+
        " to #{@new_instance.id}"
      @new_instance.wait_for {
        new_group = (db_security_groups.select do |group|
          group['DBSecurityGroupName'] == old_group_name
        end).first
        (new_group ? new_group['Status'] : 'Unknown') == 'active'
      }
    end
Wait for the new RDS Security Group to become 'active'