Documentation
¶
Overview ¶
Package parser provides HCL parsing functionality for Terraform files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DependencyExtractor ¶
type DependencyExtractor struct {
// contains filtered or unexported fields
}
DependencyExtractor extracts module dependencies from parsed Terraform files.
func NewDependencyExtractor ¶
func NewDependencyExtractor(parser ModuleParser, index *discovery.ModuleIndex) *DependencyExtractor
NewDependencyExtractor creates a new dependency extractor.
func (*DependencyExtractor) ExtractAllDependencies ¶
func (de *DependencyExtractor) ExtractAllDependencies(ctx context.Context) (map[string]*ModuleDependencies, []error)
ExtractAllDependencies extracts dependencies for all modules in the index.
func (*DependencyExtractor) ExtractDependencies ¶
func (de *DependencyExtractor) ExtractDependencies(ctx context.Context, module *discovery.Module) (*ModuleDependencies, error)
ExtractDependencies extracts dependencies for a single module.
type LibraryDependency ¶
type LibraryDependency = parsermodel.LibraryDependency
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.
type LockedProvider ¶ added in v0.8.0
type LockedProvider = parsermodel.LockedProvider
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.
type ModuleCall ¶
type ModuleCall = parsermodel.ModuleCall
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.
type ModuleDependencies ¶
type ModuleDependencies = parsermodel.ModuleDependencies
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.
type ModuleParser ¶
type ModuleParser interface {
ParseModule(ctx context.Context, modulePath string) (*ParsedModule, error)
ResolveWorkspacePath(ref *RemoteStateRef, modulePath string, locals, variables map[string]cty.Value) ([]string, error)
}
ModuleParser is the interface for parsing Terraform modules.
type ParsedModule ¶
type ParsedModule = parsermodel.ParsedModule
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles parsing of Terraform HCL files.
func (*Parser) ParseModule ¶
ParseModule parses all Terraform files in a module directory.
func (*Parser) ResolveWorkspacePath ¶
func (p *Parser) ResolveWorkspacePath(ref *RemoteStateRef, modulePath string, locals, variables map[string]cty.Value) ([]string, error)
ResolveWorkspacePath resolves workspace paths from a remote state config using the module's locals, variables, and path-derived segment values.
type RemoteStateRef ¶
type RemoteStateRef = parsermodel.RemoteStateRef
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.
type RequiredProvider ¶ added in v0.8.0
type RequiredProvider = parsermodel.RequiredProvider
Re-exports of the shared parser model under the public parser package. Aliases are kept only for types with at least one external caller; the authoritative declarations live in pkg/parser/model.