-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Expand file tree
/
Copy pathconst_variables.go
More file actions
23 lines (19 loc) · 937 Bytes
/
const_variables.go
File metadata and controls
23 lines (19 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright IBM Corp. 2014, 2026
// SPDX-License-Identifier: BUSL-1.1
package backendrun
import (
"context"
"github.com/hashicorp/terraform/internal/command/arguments"
"github.com/hashicorp/terraform/internal/tfdiags"
)
// ConstVariableSupplier is an optional interface that backends can implement
// to supply variable values from their remote storage. This is used to fetch
// const variable values that are needed during early configuration loading
// (e.g., for module source resolution), before a full operation is started.
type ConstVariableSupplier interface {
// FetchVariables retrieves Terraform variable values stored in the
// backend for the given workspace. Only variables that are relevant to
// Terraform (as opposed to environment variables or other categories)
// should be returned.
FetchVariables(ctx context.Context, workspace string) (map[string]arguments.UnparsedVariableValue, tfdiags.Diagnostics)
}