In this paper, we study the issue of decentralized voltage control for inverter-based microgrids. Such a network includes multiple distributed energy resources (DER) that are electronically interfaced with the AC network via voltage-sourced converters (VSC). A microgrid should be able to operate being both connected to the main utility grid and in the autonomous mode, which demands advanced voltage and frequency control compared to traditional rotating generators, the dynamic of VSCs are much faster and dependent on the converters' control design. The fast dynamic response and potentially large number of DERs in the microgrid make decentralized control a preferred structure. We design decentralized controllers using sparsity promoting optimal control. The approach enables us to compare different communication topologies such as neighbor-to-neighbor and purely local control. We evaluate our approach on numerical examples.