I was going through the Terraform documentation for
init and found the following:
Child Module Installation
During init, the configuration is searched for module blocks, and the source code for referenced modules is retrieved from the locations given in their source arguments.
Re-running init with modules already installed will install the sources for any modules that were added to configuration since the last init, but will not change any already-installed modules. Use -upgrade to override this behavior, updating all modules to the latest available source code.
To skip child module installation, use -get=false. Note that some other init steps can complete only when the module tree is complete, so it’s recommended to use this flag only when the working directory was already previously initialized with its child modules.
Firstly, let me clarify my understanding of a Child Module. Child Module are modules that are defined within a Module
Now I have multiple points of confusion in the above documentation section:
- In the first paragraph, the documentation talks about the installation of Modules. Shouldn’t the documentation focus on Child Modules instead?
- Again the second paragraph does the same. Let’s assume that the same concept works for both shouldn’t that be explicitly specified?
- In the third paragraph, the sentence speaks about skipping Child Module installation but the
terraform init -helpdisplays the following for
# Terraform v1.6.4 on linux_amd64
-get=false Disable downloading modules for this configuration.
There are only two conclusions that I could come up with:
- Module and Child Module are interchangeable terms.
- There is an issue with how the documentation is written.