Commit graph

8 commits

Author SHA1 Message Date
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
Daniel Schmidt
2ed6e1facd
stacks: validate lockfile containing all providers
If the providers are not in the lockfile fetching the schema fails.
This leads to follow up diagnostics that send an unclear message.
Now we validate the lockfile and if something is missing we skip further validation that relies on
the provider schema being present.
2024-07-03 14:41:08 +02:00
Liam Cervante
bced645a4d
stacks: call terraform.Validate on stack component configs (#34705) 2024-02-21 10:58:44 +01:00
Martin Atkins
67d8a5137b rpcapi+stacks: Stacks runtime can see whether experiments are allowed
We allow experiments only in alpha builds, and so we propagate the flag
for whether that's allowed in from "package main". We previously had that
plumbed in only as far as the rpcapi startup.

This plumbs the flag all the way into package stackeval so that we can
in turn propagate it to Terraform's module config loader, which is
ultimately the one responsible for ensuring that language experiments can
be enabled only when the flag is set.

Therefore it will now be possible to opt in to language experiments in
modules that are used in stack components.
2024-02-12 12:13:08 -08:00
Martin Atkins
d1b0632e82 stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
Martin Atkins
3dc3781904 stackruntime: Starting up and configuring provider plugins
Each declared provider configuration is now started up and configured
during planning. We don't actually do anything with them yet other than
shut them down again once the plan is complete, but we'll improve on that
in subsequent commits.
2023-11-15 12:38:54 -08:00
Martin Atkins
791a5fb8a6 stackruntime: Top-level "Validate" function
This is the public entry point for the overall validation of an entire
stack configuration. So far it supports validation only of input variables,
embedded stack calls, and output values. We'll grow this to support other
language constructs in later commits.

This is a relatively large commit due to introducing various supporting
infrastructure to help make evaluation possible at all. Subsequent commits
will hopefully be more focused due to being able to depend on the
foundations introduced here.
2023-11-15 12:38:51 -08:00
Martin Atkins
4754889950 stackruntime: Beginnings of Validate function
This stubs out the basic structure of stackeval's equivalent of a graph
walk, which is really just a recursive tree walk starting async tasks that
might depend on each other via the abstractions in package "promising".

This initial work is sufficient to validate the inputs to an embedded
stack call when referring to input variables in the calling stack, showing
that the expression evaluation model seems to be working and the use of
promises to deal with dependency ordering seems viable.
2023-11-15 12:38:51 -08:00