Open mike-morr opened 4 years ago
FYI. I tried adding the version to the inputs as a workaround, but it resulted in:
[terragrunt] 2020/10/06 22:07:18 WARNING: no double-slash (//) found in source URL p/us-west-2/dev/atlantis_fargate/terraform-aws-modules/atlantis/aws. Relative paths in downloaded Terraform code may not work.
This might trip people up, since the TF registry has already been updated to show only the new syntax in the top right of the documentation
This is not something currently supported. Right now, Terragrunt solely supports the source
param. PRs to support an optional, separate version
param are welcome.
Hmm - Trying to understand what's the actual limitation here. Could you not just use locals
to perform an in-place interpolation following the standard git
module source of Terraform?
# project/us-west-2/dev/atlantis_fargate/terragrunt.hcl
locals {
module_url = "git::https://github.com/hashicorp/terraform-aws-consul.git" # << This could come from anywhere else in your TG project
module_version = "v0.0.8" << This could come from anywhere else in your TG project
}
terraform {
source = "${local.module_url}?ref=${local.module_version}"
}
@kitos9112 that doesn't work if you are utilizing terraform.io or another registry provider to download the modules instead of git.
See https://www.terraform.io/docs/registry/modules/use.html#using-modules
Fair point - not consuming much Terraform content directly from the registry. You're right, this could be an enhancement to Terragrunt :)
@kitos9112 is there a formal way I can make this feature request? I would try to provide a PR to address this issue, but I don't think I'm familiar enough with this project or competent enough with Golang to do so.
is there a formal way I can make this feature request?
This is the ticket for the feature request (the enhancement
tag). We're buried right now though with other initiatives so unlikely that we (Gruntwork) will get to this anytime soon. If anyone wants to contribute this from the community, the key places to update are:
config
needs to be updated to parse the new version
attributecli/tfsource
needs to be updated to handle the registry syntax for downloading the sourcecli
needs to be updated to translate the config
to cli/tfsource
I am trying to use the new module syntax shown above in TF 0.13 on TG 0.25.2 and getting the following error:
I am assuming this is just not supported yet. If so, this is a feature request. Otherwise, it is a support request. :-)
Thank you for the amazing project! 🥇