diff --git a/docs/discussions/knowledge-base/709.mdx b/docs/discussions/knowledge-base/709.mdx new file mode 100644 index 0000000000..42f753abb0 --- /dev/null +++ b/docs/discussions/knowledge-base/709.mdx @@ -0,0 +1,27 @@ +--- +hide_table_of_contents: true +hide_title: true +custom_edit_url: null +--- + +import CenterLayout from "/src/components/CenterLayout" +import GitHub from "/src/components/GitHub" + +
+ + + +Hi all 
I'm setting up a new Terragrunt repository and have few questions specially regarding the best practices around the pipeline. I'll be using Github Actions.
\nMy current Terragrunt structure looks like this:
\n.\n├── config\n│   ├── _envcommon\n│   │   ├── README.md\n│   │   ├── s3.hcl\n│   │   └── s3-logging-bucket.hcl\n│   ├── Makefile\n├── environments\n│   ├── dev\n│   │   ├── ap-southeast-2\n│   │   │   ├── region.hcl\n│   │   │   ├── s3\n│   │   │   │   ├── Makefile\n│   │   │   │   └── terragrunt.hcl\n│   │   │   └── s3-logging-bucket\n│   │   │       ├── Makefile\n│   │   │       └── terragrunt.hcl\n│   │   ├── env.hcl\n│   │   └── Makefile\n│   ├── prod\n│   │   └── env.hcl\n│   └── staging\n│       └── env.hcl\n├── modules\n├── README.md\n└── terragrunt.hcl\nThe main reason I'm using Terragrunt, is because after few years mainly using Terraform I ended up learning the hard way that Terraform sucks when there are multiple modules, state files and dependencies between them.
\nLooks like I cannot use run-all with Terragrunt when there are dependencies between modules. In that case, I'll have to make my CI to enter in each environment/**/ap-southeast-2/**/ folder and run the commands there.
However by doing that, I'll be creating lots and lots of duplicated files in the .github/workflow directory for each of the resources. Github Actions will need to perform the following:
[...]\ncd environment/dev/ap-southeast-2/s3\nterragrunt plan\n[...]\n\n[...]\ncd environment/dev/ap-southeast-2/s3-logging-bucket\nterragrunt plan\n[...]\n\n[...]\ncd environment/dev/ap-southeast-2/vpc\nterragrunt plan\n[...]\n\netc\nWondering if there are better ways to achieve the same result? Any suggestions are more than welcome.
\nCheers! 
\n\n@lpossamai we have a similar issue when trying to run
\nterragrunt run-all initandterragrunt run-all planagainst all of our terragrunt directories. We're using terragrunt in a CICD pipeline via GitHub Actions and after a few iterations, we got around the output dependency issue by introducing the mock outputs, but now we get something liketerragrunt Underlying error: invalid character ':' after top-level valuewhen trying to do arun-all plan. Have you managed to find a workaround? In the interim, we've created a Makefile and are now running the int, plan and apply against the first directory then moving onto the second directory. But this is not ideal. Ideally, we want a separate task in GitHub Actions to run aterragrunt run-all initthen a separate task to run aterragrunt run-all planand then finally a separate task to run aterragrunt run-all apply. Any advice?
Hey! The only solution I found was to use Atlantis or Terrateam. I've been using Terrateam and the community there is great and really help you out! I strongly suggest you try them :) It's been working great for me!
\nI even got in touch with antonbabenko to ask for some advise but he also mentioned the two solutions above.
\nGood luck!
"}}} /> + +A customer asked:
\n\n\nI'm encountering an error where the repo-copier fails to parse a destination URL:
\n
The example target is
\ngitlab https://domain.com/gitlab/project/repo\nThe failure is
\nERROR:  GET https://domain/api/v4/namespaces/gitlab/project/repo: 404 failed to parse unknown error format\nThe path should contain the full path to a GitLab group. GitLab group is a kind of GitHub organization. Please make sure you specify the exact group, not a repository or user.
\ncredit for this answer goes to @levkoburburas
"}}} /> +A customer asked:
\n\n\nI'm encountering an error where the repo-copier fails to parse a destination URL:
\n
The example target is
\ngitlab https://domain.com/gitlab/project/repo\nThe failure is
\nERROR:  GET https://domain/api/v4/namespaces/gitlab/project/repo: 404 failed to parse unknown error format\nThe path should contain the full path to a GitLab group. GitLab group is a kind of GitHub organization. Please make sure you specify the exact group, not a repository or user.
\ncredit for this answer goes to @levkoburburas
"}}} />