Australia's electronic spy agency was forced to rely on diesel backup generators when the nation's power supply came under intense pressure during last month's heatwave.

The Turnbull government claims the nation's cyber security was put in jeopardy when the Department of Defence - which houses the shadowy Australian Signals Directorate - was asked to help with load shedding during soaring temperatures on February 10.

Dan Tehan, the minister responsible for cyber security, said ASD shifted to generators as a precautionary measure because it was concerned about the reliability of the grid.

"This meant that an agency responsible for critical infrastructure was on backup power to preempt a cut," Mr Tehan said.