We use a simple elastic Hamiltonian for the vortex lattice in a weak impurity background which includes defects in the form of integer-valued fields to calculate the free energy of a vortex lattice in the deep Hc2 region. The phase diagram in this regime is obtained by applying the variational approach of Mézard and Parisi developed for random manifolds. We find a first-order line between the Bragg-glass and vortex-glass phase as a continuation of the melting line. In the liquid phase, we obtain an almost vertical third-order glass transition line near the critical temperature in the H − T plane. Furthermore, we find an almost vertical second-order phase transition line in the Bragg-glass as well as the vortex-glass phases which crosses the first-order Bragg-glass, vortex-glass transition line. We calculate the jump of the temperature derivate of the induction field across this second-order line as well as the entropy and magnetic field jumps across the first-order line.