Catalyzes the sulfuryl group transfer from 3'-phosphoadenosine-5'-phosphosulfate (PAPS) to trehalose, leading to trehalose-2-sulfate (T2S). The sulfation of trehalose is the first step in the biosynthesis of sulfolipid-1 (SL-1), a major cell wall glycolipid and the most abundant sulfated metabolite found in Mycobacterium tuberculosis, that is a potential virulence factor thought to mediate host-pathogen interactions. 3'-phosphoadenylyl sulfate + alpha,alpha-trehalose = 2-O-sulfo-alpha,alpha-trehalose + adenosine 3',5'-bisphosphate + H(+) Glycolipid metabolism. Homodimer. Loss of T2S and SL-1 formation, but phthiocerol dimycocerosate (PDIM) biosynthesis remains intact. Cells lacking this gene exhibit augmented survival in human but not murine macrophages, suggesting that SL-1 negatively regulates the intracellular growth of M.tuberculosis in a species-specific manner. Moreover, the mutant strains exhibit increased resistance in vitro to a human cationic antimicrobial peptide, LL-37, while they do not show global defects in overall cell envelope integrity. Belongs to the Stf0 sulfotransferase family. Truncated N-terminus.