Prepare resource