Documentation
¶
Overview ¶
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *
This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. *
This product includes software developed at Datadog (https://www.datadoghq.com) Copyright 2024 Datadog, Inc.
Package moduleprepare materializes Terraform modules for a later offline scan.
Index ¶
Constants ¶
View Source
const ( DefaultMaxDepth = 16 DefaultResolutionTimeout = 15 * time.Minute DefaultFetchTimeout = resolver.DefaultFetchTimeout )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
RepositoryRoot string
// ArtifactDir is published atomically and must not already exist.
ArtifactDir string
DiscoveryPaths []string
// Resolver replaces the standard resolver chain when set.
Resolver resolver.Resolver
// AdditionalResolvers run before the standard network resolvers.
AdditionalResolvers []resolver.Resolver
HostAllowlist []string
CacheDir string
MaxCacheBytes int64
// MaxDepth caps remote-module traversal depth. nil uses DefaultMaxDepth; explicit zero disables traversal.
MaxDepth *int
FetchTimeout time.Duration
ResolutionTimeout time.Duration
ResourceLimits resolver.ResourceLimits
TotalParseBytes int64
// MaxConfigFileBytes skips module calls in configuration files the scan will
// not parse (see tfmodules.MaxConfigFileBytesForScan). Zero or negative
// reads every file.
MaxConfigFileBytes int64
FS vfs.FS
// LinkPackages hard-links resolved package files outside RepositoryRoot into
// the artifact instead of copying them, falling back to copies across
// filesystems. Linked files share their inode with the resolver's copy,
// whose permissions are narrowed to the artifact's, so enable it only when
// nothing rewrites resolved packages in place afterwards, as in a throwaway
// scan environment.
LinkPackages bool
}
type Result ¶
type Result struct {
ManifestPath string
Modules []resolver.ManifestModule
Stats []modulegraph.ModuleStat
Failures []modulegraph.ResolutionFailure
BudgetEvents []modulegraph.BudgetEvent
TimedOut bool
}
Click to show internal directories.
Click to hide internal directories.