In addition to Julie's suggestion, for resources whose total consumption is
related to the task duration, like fuel that is burned at 10 litres/hr for
the duration of the task, instead of entering total units to be used in the
resource assignment dialog box, enter the rate of usage. In my example, the
resource name would be gasoline, the type would be material, the units would
be litres, and the standard rate would be the cost/litre. When entered into
the resource assignment dialog you would put "10/hr" in the units column.
Then the total used will change as the task gets longer or shorter. Just
entering the number without the "/hr" means that number of units will be
used over the duration of the task regardless of its duration, exactly what
should happen with your pipe (to get from Here to There will require 30 feet
of pipe, 3 units, regardless of whether it takes you 4 hours or 6 hours to
install it).