The results of a search for charged Higgs bosons are presented. The analysis is based on 4.6 fb(-1) of proton-proton collision data at root s = 7TeV collected by the ATLAS experiment at the Large Hadron Collider, using top quark pair events with a tau lepton in the final state. The data are consistent with the expected background from Standard Model processes. Assuming that the branching ratio of the charged Higgs boson to a tau lepton and a neutrino is 100%, this leads to upper limits on the branching ratio of top quark decays to a b quark and a charged Higgs boson between 5% and 1% for charged Higgs boson masses ranging from 90GeV to 160GeV, respectively. In the context of the m(h)(max) scenario of the MSSM, tan beta above 12-26, as well as between 1 and 2-6, can be excluded for charged Higgs boson masses between 90GeV and 150GeV.