Key Points to Consider While Using a Module
Whether you create a module yourself or use public modules, there are certain points you need to be aware of while using these. Though not exhaustive, the following points are a good starter:
- Modules call other modules using a module block.
- After adding or removing module blocks, you must run
terraform init
to enable Terraform to either download a module or delete a module. - If you modify a module block, you will have to run
terraform init –upgrade
to enable Terraform to download the latest changes. - When you are using a public module from Terraform Registry, go for verified modules unless there is not a verified module for your requirements. Verified modules are reviewed by HashiCorp for compatibility with the Terraform core. These modules also have active contributors from the providers (like AWS, GCP, and so on) to keep the module up to date. The verified badge appears next to modules that are published by a verified...