Terraform
terraform stacks init reference
Use the terraform stacks init command to initialize a Stack component configuration by downloading configuration dependencies.
Usage
$ terraform stacks <global-stacks-flags> init <options>
Description
Initialize the Stack's component configuration by downloading the configuration dependencies. This command creates a .terraform directory, and populates it with any remote modules or sub-Stacks. Do not include the .terraform directory in version control. This command also downloads any provider dependencies and creates a .terraform.lock.hcl file.
Options
-upgrade: Install the latest module and provider versions allowed within configured constraints, overriding the default behavior of selecting exactly the version recorded in the dependency lockfile.- Optional.
- Boolean flag.
- Default: false.
-json: Output results in JSON format instead of the default human-readable text format.- Optional.
- Boolean flag.
- Default: false.
Examples
The following command initializes a Stack's component configuration:
$ terraform stacks init
The following command initializes a Stack's component configuration and upgrades to the latest allowed versions:
$ terraform stacks init -upgrade
Global flags
Refer to Global flags reference for information about flags you can use with all commands.