Programatic way of creating Cloudformation SecurityGroup Templates