moduleprepare

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

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          = 8
	DefaultResolutionTimeout = 5 * time.Minute
	DefaultFetchTimeout      = 30 * time.Second
)

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
	FS                vfs.FS
}

type Result

type Result struct {
	ManifestPath string
	Modules      []resolver.ManifestModule
	Failures     []modulegraph.ResolutionFailure
	BudgetEvents []modulegraph.BudgetEvent
	TimedOut     bool
}

func Prepare

func Prepare(ctx context.Context, config *Config) (Result, error)

Prepare resolves a staged repository's module graph into an offline scan artifact.

Jump to

Keyboard shortcuts

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