Documentation
¶
Overview ¶
Package providercache provides initialization of the Terragrunt provider caching server for caching OpenTofu providers.
Index ¶
Constants ¶
View Source
const ( // The status returned when making a request to the caching provider. // It is needed to prevent further loading of providers by terraform, and at the same time make sure that the request was processed successfully. CacheProviderHTTPStatusCode = http.StatusLocked // Authentication type on the Terragrunt Provider Cache server. APIKeyAuth = "x-api-key" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderCache ¶
func InitServer ¶
func InitServer(l log.Logger, opts *options.TerragruntOptions) (*ProviderCache, error)
func (*ProviderCache) TerraformCommandHook ¶
func (cache *ProviderCache) TerraformCommandHook( ctx context.Context, l log.Logger, opts *options.TerragruntOptions, args clihelper.Args, ) (*util.CmdOutput, error)
TerraformCommandHook warms up the providers cache, creates `.terraform.lock.hcl` and runs the `tofu/terraform init` command with using this cache. Used as a hook function that is called after running the target tofu/terraform command. For example, if the target command is `tofu plan`, it will be intercepted before it is run in the `/shell` package, then control will be passed to this function to init the working directory using cached providers.
Click to show internal directories.
Click to hide internal directories.