Key Points to Consider When You Create a Module
Once you decide to create a module for a certain requirement, there are certain points to keep in mind:
- You need to decide whether you are going to create modules to encapsulate all the services required for a particular project or create modules for the resources that are then called by a root module of the project. This is an important consideration and has a long-term impact since you will be using these modules on a day-to-day basis. Hence, it is a good idea to brainstorm this with your team before deciding on the approach.
- An infrastructure object may need multiple arguments to be passed before it can be provisioned. For example, an EC2 instance would need
ami-id
,instance-type
,keypair
,security group
, and a number of other details. You will have to decide which of these arguments should be exposed to users and which ones to hide (and pass default values). Exposing all the arguments will make it difficult for the user...