AWS:Module organisation for the VPC configuration

I am a little confused with how to organize the VPC as a module, right now I have a single file called which contains all the configuration for the VPC.

Here is the list of the resoureces

  • VPC
  • Subnet(3-priv and 3-pub)
  • Routetable(3-priv subnet and 3-pub subnet)
  • Elastic-ip(3)
  • Internet gateway(3)
  • NAT gateway(3)

As you see above the resource configurations is duplicated except for the VPC , what is the best approach to modularize the above configuration