We apply first-principles methods to investigate the electronic properties of semiconductor carbon nanotubes deposited on hydrogen-terminated diamond surfaces. We found that the band gap of the diamond-nanotube system can be continuously varied (from 0 to 0.8 eV) through the application of an external electric field. The metal semiconductor transition occurs for values of field between 0.03 and 0.035 V/angstrom, which could make viable the production of stable field-effect devices at nanometric scale. We also found that at zero value of electric field the nanotube electrical behavior can be modified by changing the diamond surface termination, which may be useful for producing ohmic metal semiconductor contacts. On the other hand, at zero values of field, tubes deposited on nitrogen-doped diamond are metallic regardless of the surface termination. Thus, nitrogen doping could be useful in situations in which the atomistic details of the diamond surface are difficult to control.