Skip to content

Conversation

@kmoe
Copy link
Member

@kmoe kmoe commented Nov 25, 2025

Closes #238

Add support for terraform providers mirror.

This subcommand, added in Terraform 0.13, downloads the providers required for the current configuration to a local directory, whose path is a required positional argument for the command.

The command has two optional flags: -platform=OS_ARCH and -lock-file=true, the latter of which was added in Terraform 1.10.

Testing

End-to-end tests and unit tests added.

@kmoe kmoe requested review from a team as code owners November 25, 2025 11:53
@kmoe kmoe force-pushed the providers-mirror-subcommand branch 2 times, most recently from e31b905 to a637a68 Compare November 25, 2025 12:16
kmoe and others added 2 commits November 25, 2025 12:44
I believe the Latest_v1 constant was always meant to represent the latest available version with a major version of 1, but its use has been ambiguous. If we need a constant to represent the latest available version with a major version of 1 and minor version of 0, it should be named Latest_v1_0. Latest_v1 has been moved to the bottom of the declaration to make this clearer.
Add support for `terraform providers mirror`.

This subcommand, added in Terraform 0.13, downloads the providers required for the current configuration to a local directory, whose path is a required positional argument for the command.

The command has two optional flags: -platform=OS_ARCH and -lock-file=true, the latter of which was added in Terraform 1.10.

Co-authored-by: Radek Simko <radeksimko@users.noreply.github.com>
Co-authored-by: Daniel Schmidt <danielmschmidt92@gmail.com>
Co-authored-by: Matej Risek <matej.risek@hashicorp.com>
Co-authored-by: Samsondeen Dare <samsondeen.dare@hashicorp.com>
@kmoe kmoe force-pushed the providers-mirror-subcommand branch from a637a68 to 15c9ca7 Compare November 25, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support terraform providers mirror

2 participants