Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on terragrunt-source-map first path segment in URL cannot contain colon #3735

Open
1 of 2 tasks
cmanzur opened this issue Jan 7, 2025 · 0 comments
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@cmanzur
Copy link

cmanzur commented Jan 7, 2025

Describe the bug

I'm using my custom module at:
[email protected]:my-org/modules.git//blueprints/aws/argocd

In $HOME/github/modules I currently have a copy of that github repository with local changes.

I'm running:

cd prod
terragrunt run-all plan --terragrunt-include-dir "*/*/common/argocd" --terragrunt-source-map "[email protected]:my-org/modules.git=$HOME/github/modules"

Output:

16:23:11.454 INFO   The stack at . will be processed in the following order for command plan:
Group 1
- Module ./us-east-1/account-1/common/argocd

16:23:11.677 ERROR  [us-east-1/account-1/common/argocd] Module ./us-east-1/account-1/common/argocd has finished with an error

* parse "[email protected]:my-org/modules.git?ref=1.0.0": first path segment in URL cannot contain colon

Steps To Reproduce

Tree Structure:

_envcommon
dev
prod
root.hcl

File: dev/us-east-1/account-1/common/argocd

include "root" {
  path = find_in_parent_folders("root.hcl")
}

include "envcommon" {
  path   = "${dirname(find_in_parent_folders("root.hcl"))}/_envcommon/argocd/argocd.hcl"
  expose = true
}

terraform {
  source = "${include.envcommon.locals.base_source_url}?ref=1.0.0"
}

File: _envcommon/argocd/argocd.hcl

locals {
  # Expose the base source URL so different versions of the module can be deployed in different environments. This will
  # be used to construct the source URL in the child terragrunt configurations.
  base_source_url = "[email protected]:my-org/modules.git//blueprints/aws/argocd"
}

I also tried with:
--terragrunt-source-map "ssh://[email protected]:my-org/modules.git=$HOME/github/modules"
and
--terragrunt-source-map "git::ssh://[email protected]:my-org/modules.git=$HOME/github/modules"
Same result.

Expected behavior

Terragrunt should run using my local code instead of the github repository.

Nice to haves

  • Terminal output
  • Screenshots

Versions

  • Terragrunt version: 0.71.2
  • OpenTofu/Terraform version: 1.9.8
  • Environment details (Ubuntu 20.04, Windows 10, etc.): Ubuntu 22-04 LTS and also in Macbook Pro M2
@cmanzur cmanzur added the bug Something isn't working label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant