Using Terraform CLI, how do you download module source codes in order to be able to look at how the module is implemented and copy the examples easily?

Experience Level: Junior
Tags: Terraform

Answer

Run the following command:

terraform init -from-module source

Example:

terraform init -from-module Azure/vnet/azurerm

The code above will download source codes of the module Azure/vnet/azurerm.

Comments

No Comments Yet.
Be the first to tell us what you think.
Terraform CLI
Terraform CLI

Are you learning Terraform ? Try our test we designed to help you progress faster.

Test yourself