Class: Dependabot::Terraform::FileParser

Inherits:
FileParsers::Base
  • Object
show all
Extended by:
T::Sig
Includes:
FileSelector
Defined in:
lib/dependabot/terraform/file_parser.rb

Constant Summary collapse

DEFAULT_REGISTRY =
"registry.terraform.io"
DEFAULT_NAMESPACE =
"hashicorp"
PROVIDER_SOURCE_ADDRESS =
%r{\A((?<hostname>.+)/)?(?<namespace>.+)/(?<name>.+)\z}

Instance Method Summary collapse

Methods included from FileSelector

#dependency_files

Instance Method Details

#parseObject



33
34
35
36
37
38
39
40
41
# File 'lib/dependabot/terraform/file_parser.rb', line 33

def parse
  dependency_set = DependencySet.new

  parse_terraform_files(dependency_set)

  parse_terragrunt_files(dependency_set)

  dependency_set.dependencies.sort_by(&:name)
end