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

terragrunt error #12

Open
bisio opened this issue Jan 4, 2023 · 5 comments
Open

terragrunt error #12

bisio opened this issue Jan 4, 2023 · 5 comments

Comments

@bisio
Copy link

bisio commented Jan 4, 2023

running terragrunt run-all init in K8sClass/terragrunt/stacks/stage i get an error:

ERRO[0011] Module /home/bisio/learn/aws/K8sClass/terragrunt/stacks/stage/eks has finished with an error: /home/bisio/learn/aws/K8sClass/terragrunt/stacks/stage/vpc/terragrunt.hcl is a dependency of /home/bisio/learn/aws/K8sClass/terragrunt/stacks/stage/eks/terragrunt.hcl but detected no outputs. Either the target module has not been applied yet, or the module has no outputs. If this is expected, set the skip_outputs flag to true on the dependency block. prefix=[/home/bisio/learn/aws/K8sClass/terragrunt/stacks/stage/eks]
ERRO[0011] 1 error occurred:
* /home/bisio/learn/aws/K8sClass/terragrunt/stacks/stage/vpc/terragrunt.hcl is a dependency of /home/bisio/learn/aws/K8sClass/terragrunt/stacks/stage/eks/terragrunt.hcl but detected no outputs. Either the target module has not been applied yet, or the module has no outputs. If this is expected, set the skip_outputs flag to true on the dependency block.

ERRO[0011] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

@bisio
Copy link
Author

bisio commented Jan 4, 2023

a terragrunt/stacks/stage/common.tfvars is missing in the repository
and to make terragrunt works i had to run first terragrunt apply in terragrunt/stacks/stage/vpc

@ldalves
Copy link

ldalves commented Feb 7, 2023

@bisio thanks for opening this issue. I got the same... So were the common.tfvars created after you run terragrunt apply in terragrunt/stacks/stage/vpc?

@ldalves
Copy link

ldalves commented Feb 7, 2023

ok. it does not create it.

K8sClass/terragrunt/stacks/stage/common.tfvars does not exist.

@bisio do you know what the content should be for common.tfvars?

@ldalves
Copy link

ldalves commented Feb 7, 2023

@vallard could you please provide the missing common.tfvars. i watched the demo on oReilly again and i saw that in the class demo you have the file. :)

@ldalves
Copy link

ldalves commented Feb 7, 2023

This is the entire output untilt the error:

$ terragrunt run-all init

INFO[0000] The stack at /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage will be processed in the following order for command init:
Group 1
- Module /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/vpc

Group 2
- Module /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/eks

Initializing modules...

Initializing the backend...

Initializing provider plugins...
- terraform.io/builtin/terraform is built in to Terraform
- Reusing previous version of hashicorp/aws from the dependency lock file
- Using previously-installed hashicorp/aws v4.53.0

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
ERRO[0010] Module /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/eks has finished with an error: /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/vpc/terragrunt.hcl is a dependency of /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/eks/terragrunt.hcl but detected no outputs. Either the target module has not been applied yet, or the module has no outputs. If this is expected, set the skip_outputs flag to true on the dependency block.  prefix=[/Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/eks]
ERRO[0010] 1 error occurred:
	* /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/vpc/terragrunt.hcl is a dependency of /Users/leandroalves/dev/K8sClass/terragrunt/stacks/stage/eks/terragrunt.hcl but detected no outputs. Either the target module has not been applied yet, or the module has no outputs. If this is expected, set the skip_outputs flag to true on the dependency block.

ERRO[0010] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants