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

On GitHub Enterprise Server, catalog and scaffold only support the latest version, not specific versions #3699

Open
brant4test opened this issue Dec 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@brant4test
Copy link

Describe the bug

When using a repo on GitHub Enterprise Server, the end-to-end process of using Terragrunt Catalog and Scaffold only works with the latest version and does not support specifying a version.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Use a repo on GitHub Enterprise Server.
  2. Try specifying a version using //.?ref=v6.1.0 or ?ref=v6.1.0.
  3. Run the terragrunt catalog command.
  4. Observe that no code is scaffolded and the directory remains empty.
gruntwork@host:~/code/terragrunt/org/scaffold/infrastructure-live/auth-dev/us-west-2/dev/services/oauth/test6$ terragrunt catalog
22:57:39.954 WARN   Using `terragrunt.hcl` as the root of Terragrunt configurations is an anti-pattern, and no longer recommended. In a future version of Terragrunt, this will result in an error. You are advised to use a differently named file like `root.hcl` instead. For more information, see https://terragrunt.gruntwork.io/docs/migrate/migrating-from-root-terragrunt-hcl
22:57:40.027 INFO   Cloning repository "git::ssh://[email protected]/org/terraform-aws-iam.git//.?ref=v6.1.0" to temporary directory "/tmp/catalog695f4c4c6d6463743566424a5635626a386571387a6e4675326d38"
22:57:44.785 INFO   Found 10 modules in repository "git::ssh://[email protected]/org/terraform-aws-iam.git//.?ref=v6.1.0"
22:57:49.012 INFO   Run Scaffold for the module: "git::ssh://[email protected]/org/terraform-aws-iam.git//.?ref=v6.1.0//modules/attach-policy-to-role"
22:57:49.013 INFO   Scaffolding a new Terragrunt module git::ssh://[email protected]/org/terraform-aws-iam.git//.?ref=v6.1.0//modules/attach-policy-to-role to .

gruntwork@host:~/code/terragrunt/org/scaffold/infrastructure-live/auth-dev/us-west-2/dev/services/oauth/test6$ ls

gruntwork@host:~/code/terragrunt/org/scaffold/infrastructure-live/auth-dev/us-west-2/dev/services/oauth/test6$ tree .
.

0 directories, 0 files

Expected behavior

The scaffolding process should work correctly when specifying a version, and code should be scaffolded into the directory.

Nice to haves

The terminal output is already included in the Steps To Reproduce section.

Versions

  • Terragrunt version: v0.70.4
  • Terraform version: v1.5.7
  • Environment details : Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-51-generic x86_64)

Additional context

Example fixture: Similar to this example, but on GitHub Enterprise Server.

@brant4test brant4test added the bug Something isn't working label Dec 21, 2024
@brant4test
Copy link
Author

brant4test commented Jan 7, 2025

Hi, @yhakbar / Team,

By the way, I would also like to inquire about the following questions. Thank you. : )

image

As shown in the diagram, I have configured three catalog URLs: U1, U2, and U3. terragrunt catalog found modules M1, M2, M3, ... M14. Here are my assumptions, and welcome your comments:

M1 and M2 are from U1.
M3 and M4 are from U2.
M4 to M14 are from U3.

Here are the related questions:

A. As the number of URLs increases, how do we maintain the correspondence between M and U? In other words, how do we categorize and classify the modules? How can we make it easy for users to quickly identify the purpose of the modules? Should we rely on the module's own README? For example, M2 and M4 have the same name but come from different URLs.

B. I know that M1 and M3 are from the root directory of their respective repositories, while the other 10 should be located in the modules subdirectory. Can all the modules be used normally, i.e., without errors?

C. Why is the name of M1 not visible? How can we fix the display name?

D. If we need to add multiple catalog URLs, do we have to add each URL individually? Does it support glob patterns? Can we add an entire organization?

E. Once the number of catalog URLs increases, will it become slow? Can we load them in groups?

F. As the platform provider, can we offer catalog URLs in a centralized location for users? For example, in terragrunt.hcl, users would only need to specify a single repository from the platform. This repository would contain all the URLs the platform wants to provide to users. The platform would be responsible for maintaining this repository.

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