2014-09-26 23:23:38 +02:00
|
|
|
---
|
|
|
|
layout: "docs"
|
|
|
|
page_title: "Command: get"
|
|
|
|
sidebar_current: "docs-commands-get"
|
2014-10-22 05:21:56 +02:00
|
|
|
description: |-
|
|
|
|
The `terraform get` command is used to download and update modules.
|
2014-09-26 23:23:38 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# Command: get
|
|
|
|
|
|
|
|
The `terraform get` command is used to download and update
|
2017-04-27 12:27:16 +02:00
|
|
|
[modules](/docs/modules/index.html) mentioned in the root module.
|
2014-09-26 23:23:38 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `terraform get [options] [dir]`
|
|
|
|
|
|
|
|
The modules are downloaded into a local `.terraform` folder. This
|
2016-11-02 07:01:18 +01:00
|
|
|
folder should not be committed to version control. The `.terraform`
|
|
|
|
folder is created relative to your current working directory
|
|
|
|
regardless of the `dir` argument given to this command.
|
2014-09-26 23:23:38 +02:00
|
|
|
|
|
|
|
If a module is already downloaded and the `-update` flag is _not_ set,
|
|
|
|
Terraform will do nothing. As a result, it is safe (and fast) to run this
|
|
|
|
command multiple times.
|
|
|
|
|
|
|
|
The command-line flags are all optional. The list of available flags are:
|
|
|
|
|
|
|
|
* `-update` - If specified, modules that are already downloaded will be
|
|
|
|
checked for updates and the updates will be downloaded if present.
|
2017-04-27 12:27:16 +02:00
|
|
|
* `dir` - Sets the path of the [root module](/docs/modules/index.html#definitions).
|