Skip to content
New issue

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

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

Already on GitHub? # 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 · 1 comment
Open
1 of 2 tasks
Labels
awaiting response Waiting for a response or more data from issue reporter bug Something isn't working

Comments

@cmanzur
Copy link

cmanzur commented Jan 7, 2025

Describe the bug

I'm using my custom module at:
git@github.com: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 "git@github.com: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 "git@github.com: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 = "git@github.com:my-org/modules.git//blueprints/aws/argocd"
}

I also tried with:
--terragrunt-source-map "ssh://git@github.com:my-org/modules.git=$HOME/github/modules"
and
--terragrunt-source-map "git::ssh://git@github.com: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
@yhakbar
Copy link
Collaborator

yhakbar commented Jan 10, 2025

Hey @cmanzur , would you mind providing more in the way of a reproducible fixture?

I should be able to clone a repository, and run it to reproduce the issue you're describing here. You can do that by creating a simple public GitHub repository, and create a fixture that reproduces the issue you need addressed.

@yhakbar yhakbar added the awaiting response Waiting for a response or more data from issue reporter label Jan 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
awaiting response Waiting for a response or more data from issue reporter bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants