mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-23 23:50:12 -06:00
cb2e9119aa
Signed-off-by: namgyalangmo <75657887+namgyalangmo@users.noreply.github.com>
23 lines
894 B
Go
23 lines
894 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package tofu
|
|
|
|
// GraphNodeDynamicExpandable is an interface that nodes can implement
|
|
// to signal that they can be expanded at eval-time (hence dynamic).
|
|
// These nodes are given the eval context and are expected to return
|
|
// a new subgraph.
|
|
type GraphNodeDynamicExpandable interface {
|
|
// DynamicExpand returns a new graph which will be treated as the dynamic
|
|
// subgraph of the receiving node.
|
|
//
|
|
// The second return value is of type error for historical reasons;
|
|
// it's valid (and most ideal) for DynamicExpand to return the result
|
|
// of calling ErrWithWarnings on a tfdiags.Diagnostics value instead,
|
|
// in which case the caller will unwrap it and gather the individual
|
|
// diagnostics.
|
|
DynamicExpand(EvalContext) (*Graph, error)
|
|
}
|