def wait_for_new_parameter_group
      old_name = @original_server.db_parameter_groups.first['DBParameterGroupName']
      update_status "Applying parameter group #{old_name} to #{@new_instance.id}"
      job = self  # save local var for closure in wait_for, below
      @new_instance.wait_for {
        new_group = (db_parameter_groups.select do |group|
          group['DBParameterGroupName'] == old_name
        end).first
        status = (new_group ? new_group['ParameterApplyStatus'] : 'Unknown')
        if (status == "pending-reboot")
          job.update_status "Rebooting RDS #{id} to apply ParameterGroup #{old_name}"
          reboot and wait_for { ready? }
        end
        status == 'in-sync' && ready?
      }
    end
def wait_for_new_parameter_group
      old_name = @original_server.db_parameter_groups.first['DBParameterGroupName']
      update_status "Applying parameter group #{old_name} to #{@new_instance.id}"
      job = self  # save local var for closure in wait_for, below
      @new_instance.wait_for {
        new_group = (db_parameter_groups.select do |group|
          group['DBParameterGroupName'] == old_name
        end).first
        status = (new_group ? new_group['ParameterApplyStatus'] : 'Unknown')
        if (status == "pending-reboot")
          job.update_status "Rebooting RDS #{id} to apply ParameterGroup #{old_name}"
          reboot and wait_for { ready? }
        end
        status == 'in-sync' && ready?
      }
    end
Wait for the new RDS Parameter Group to become 'in-sync'