I am a little confused with how to organize the VPC as a module, right now I have a single file called
vpc.tf which contains all the configuration for the VPC.
Here is the list of the resoureces
- Subnet(3-priv and 3-pub)
- Routetable(3-priv subnet and 3-pub subnet)
- 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