Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Submodule path syntax support #36

Open
davidski opened this issue Aug 21, 2020 · 6 comments
Open

Submodule path syntax support #36

davidski opened this issue Aug 21, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@davidski
Copy link

Thanks for making an HCL 2.0 compatible dependabot available! ❤️

Is submodule syntax known to be supported? I'm using a block such as

module "sg_http_inbound" {
  source              = "terraform-aws-modules/security-group/aws//modules/http-80"
  version             = "3.15.0"
  name                = "web_inbound_http"
  ...
}

This seems to be throwing an error of - Updating terraform-aws-modules/security-group/aws (from 3.1.0)…bundler: failed to load command: ./dependabot.rb (./dependabot.rb) (that 3.1.0 version string is odd as well, which I can't find in my code base).

If this should be working, I'll put some effort into generating a more useful reprex. This is currently in a thicket of private code I'm trying to sort out. Appreciate the time!

@patrickjahns patrickjahns added the bug Something isn't working label Sep 9, 2020
@patrickjahns
Copy link
Owner

Could you share the full log of the error?
It seems this is a public module - will try to generate a test-case for it and see if we can fix it somehow

@jnewland
Copy link

jnewland commented Sep 9, 2020

I'm encountering a similar error with another public module:

  - Updating terraform-aws-modules/iam/aws (from )…bundler: failed to load command: ./dependabot.rb (./dependabot.rb)
  /usr/local/bundle/bundler/gems/dependabot-core-44f458dba8ce/terraform/lib/dependabot/terraform/file_updater.rb:25:in `block in updated_dependency_files'
  /usr/local/bundle/bundler/gems/dependabot-core-44f458dba8ce/terraform/lib/dependabot/terraform/file_updater.rb:21:in `each'
  /usr/local/bundle/bundler/gems/dependabot-core-44f458dba8ce/terraform/lib/dependabot/terraform/file_updater.rb:21:in `updated_dependency_files'
  /usr/src/app/dependabot.rb:131:in `block in update'
  /usr/src/app/dependabot.rb:93:in `each'
  /usr/src/app/dependabot.rb:93:in `update'
  /usr/src/app/dependabot.rb:162:in `block in <top (required)>'
  /usr/src/app/dependabot.rb:153:in `each'
  /usr/src/app/dependabot.rb:153:in `<top (required)>'

@patrickjahns
Copy link
Owner

@jnewland
Please provide the related terraform code as well

Looking at https://github.com/dependabot/dependabot-core/pull/1299/files - upstream should handle this already.
If it doesn't it's still a bug with dependabot itself and might need a fix upstream

@jnewland
Copy link

jnewland commented Sep 9, 2020

module "irsa_aws_alb_ingress_controller" {
  source                        = "terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc"
  version                       = "~> 2.18.0"
  create_role                   = true
  role_name                     = "aws-alb-ingress-controller"
  provider_url                  = replace(module.eks.cluster_oidc_issuer_url, "https://", "")
  role_policy_arns              = [aws_iam_policy.aws_alb_ingress_controller.arn]
  oidc_fully_qualified_subjects = ["system:serviceaccount:default:aws-alb-ingress-controller"]
}

@blastik
Copy link

blastik commented Oct 1, 2020

this issue is happening to me as well. works when a module is in root but not when a repo has several modules into folders.
in fact it worked for until it breaks the loop

  - Checking aws-acm ...
  - Parsing dependencies information
  - Checking aws-cognito ...
  - Parsing dependencies information
  - Updating lgallard/cognito-user-pool/aws (from 0.4.0)…  - submitted
RuntimeError: Content didn't change!
  - Updating terraform-aws-modules/iam/aws (from 2.9.0)…bundler: failed to load command: ./dependabot.rb (./dependabot.rb)
  /usr/local/bundle/bundler/gems/dependabot-core-44f458dba8ce/terraform/lib/dependabot/terraform/file_updater.rb:25:in `block in updated_dependency_files'
  /usr/local/bundle/bundler/gems/dependabot-core-44f458dba8ce/terraform/lib/dependabot/terraform/file_updater.rb:21:in `each'
  /usr/local/bundle/bundler/gems/dependabot-core-44f458dba8ce/terraform/lib/dependabot/terraform/file_updater.rb:21:in `updated_dependency_files'
  /usr/src/app/dependabot.rb:131:in `block in update'
  /usr/src/app/dependabot.rb:93:in `each'
  /usr/src/app/dependabot.rb:93:in `update'
  /usr/src/app/dependabot.rb:162:in `block in <top (required)>'
  /usr/src/app/dependabot.rb:153:in `each'
  /usr/src/app/dependabot.rb:153:in `<top (required)>'

@stuart-c
Copy link

@patrickjahns have you had chance to look at this at all? I'm seeing exactly the same error when trying to use submodules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants