A 100 per cent affordable housing scheme near Cirencester has been given the green light.