Terraform Version
Use Cases
I want to fully automate creation of new terraform configurations, starting from a module in a private module registry, saving developers time with initial project setup in a scaled org.
Attempted Solutions
-from-module seemed like the best way to do this, as I could simply run terraform init -from-module=<my module> in a new git repo as a starting point for a new configuration. I was also evaluating terragrunt scaffold for this automation use case, but would like to stick with Terraform only if possible.
-from-module works great for my modules in a private module registry (gitlab), but ONLY for the latest version of the module. If I wanted to deploy a previous module version, I don't think there is a way to do that.
Proposal
terraform init -from-module="gitlab.com/foo/my-module/local"
works, but pulls only latest version of the module.
Add a version specification:
terraform init -from-module="gitlab.com/foo/my-module/local?version=1.0.1"
Currently this gives an Invalid module source address error. Instead it should pull version 1.0.1 of the module.
References
terragrunt scaffold