tfmodules

package
v1.7.1-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectModuleSourceType

func DetectModuleSourceType(source string) (string, string)

nolint:gocritic

func GetProviderFromResourceType

func GetProviderFromResourceType(resourceType string) (string, error)

GetProviderFromResourceType extracts the provider name from a Terraform resource type. For example: "aws_s3_bucket" → "aws", "azurerm_network_interface" → "azurerm"

func LooksLikeLocalModuleSource

func LooksLikeLocalModuleSource(source string) bool

LooksLikeLocalModuleSource uses heuristics to determine if the resolved source string is likely local

func ParseTerraformModules

func ParseTerraformModules(ctx context.Context, fsys vfs.FS, files model.FileMetadatas, numWorkers int) (map[string]ParsedModule, error)

ParseTerraformModules parses HCL content and extracts module source/version. numWorkers: 0 means auto-detect (GOMAXPROCS).

Types

type ModuleAttributesInfo

type ModuleAttributesInfo struct {
	Resources []string          `json:"resources"`
	Inputs    map[string]string `json:"inputs"`
}

type ParsedModule

type ParsedModule struct {
	Name           string
	AbsSource      string
	Source         string
	Version        string
	IsLocal        bool
	SourceType     string // local, git, registry, etc.
	RegistryScope  string // public, private, or "" (non-registry)
	AttributesData map[string]ModuleAttributesInfo
}

func ParseAllModuleVariables

func ParseAllModuleVariables(ctx context.Context, fsys vfs.FS, modules map[string]ParsedModule, rootDir string) ([]ParsedModule, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL