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

terraform init fails with error "Failed to expand subdir globs" #13

Open
silviu-paunescu-mindit opened this issue Aug 22, 2023 · 0 comments

Comments

@silviu-paunescu-mindit
Copy link

Describe the bug
Command "terraform init" fails.

To Reproduce

  1. Clone the repository
  2. Make sure "main" is the current branch
  3. Execute command "terraform init" in the root of the local clone directory

Expected behavior
Command "terraform init":

  1. completes successfully with exit code 0
  2. (optionally) prints message "Terraform has been successfully initialized!"

Actual behavior
Command "terraform init":

  1. fails with exit code 1
  2. prints error message subdir "modules/kubernetes-addons/helm-addon" not found

Full "terraform init" output:

Initializing the backend...
Initializing modules...
Downloading git::https://github.com/aws-ia/terraform-aws-eks-blueprints.git for helm_addon...
╷
│ Error: Failed to expand subdir globs
│
│ subdir "modules/kubernetes-addons/helm-addon" not found
╵

Desktop:

  • OS: Windows 10

  • terraform:

     Terraform v1.5.5
     on windows_amd64
     + provider registry.terraform.io/hashicorp/aws v5.13.1
     + provider registry.terraform.io/hashicorp/helm v2.10.1
     + provider registry.terraform.io/hashicorp/kubernetes v2.23.0
    

Root cause
This project depends on project terraform-aws-eks-blueprints (see main.tf:39).
Currently, this dependency is linked to the default branch of the target dependency project.
But this branch has evolved in such a way that is no longer compatible with this project.

Proposed fix
Change line main.tf:39 to:
source = "github.com/aws-ia/terraform-aws-eks-blueprints//modules/kubernetes-addons/helm-addon?ref=v4.32.1"
(note the trailing ?ref=v4.32.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

1 participant