Class: Dependabot::Terraform::FileParser

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

Constant Summary collapse

ARCHIVE_EXTENSIONS =
%w(.zip .tbz2 .tgz .txz).freeze
DEFAULT_REGISTRY =
"registry.terraform.io"
DEFAULT_NAMESPACE =
"hashicorp"
PROVIDER_SOURCE_ADDRESS =
%r{\A((?<hostname>.+)/)?(?<namespace>.+)/(?<name>.+)\z}.freeze

Instance Method Summary collapse

Instance Method Details

#parseObject


28
29
30
31
32
33
34
35
36
# File 'lib/dependabot/terraform/file_parser.rb', line 28

def parse
  dependency_set = DependencySet.new

  parse_terraform_files(dependency_set)

  parse_terragrunt_files(dependency_set)

  dependency_set.dependencies.sort_by(&:name)
end