comment updates

This commit is contained in:
James Bardin 2020-03-25 15:53:54 -04:00
parent 5810261add
commit 4f1692cfaf
4 changed files with 6 additions and 16 deletions

View File

@ -215,12 +215,6 @@ func (ctx *BuiltinEvalContext) ProviderInput(pc addrs.AbsProviderConfig) map[str
func (ctx *BuiltinEvalContext) SetProviderInput(pc addrs.AbsProviderConfig, c map[string]cty.Value) {
absProvider := pc
//if !absProvider.Module.Equal(ctx.Path().Module()) {
// // This indicates incorrect use of InitProvider: it should be used
// // only from the module that the provider configuration belongs to.
// panic(fmt.Sprintf("%s initialized by wrong module %s", absProvider, ctx.Path()))
//}
if !pc.Module.IsRoot() {
// Only root module provider configurations can have input.
log.Printf("[WARN] BuiltinEvalContext: attempt to SetProviderInput for non-root module")

View File

@ -13,8 +13,6 @@ import (
// context with which to expand the resource into multiple instances.
// This type should be a drop in replacement for NodeApplyableResource, and
// needs to mirror any non-evaluation methods exactly.
// TODO: We may want to simplify this later by passing EvalContext to EvalTree,
// and returning an EvalEquence.
type nodeExpandApplyableResource struct {
*NodeAbstractResource
}

View File

@ -11,17 +11,10 @@ import (
// nodeExpandPlannableResource handles the first layer of resource
// expansion. We need this extra layer so DynamicExpand is called twice for
// the resource, the first to expand the Resource for each module instance, and
// the second to expand each ResourceInstnace for the expanded Resources.
//
// Even though the Expander can handle this recursive expansion, the
// EvalWriteState nodes need to be expanded and Evaluated first, and our
// current graph doesn't allow evaluation within DynamicExpand, and doesn't
// call it recursively.
// the second to expand each ResourceInstance for the expanded Resources.
type nodeExpandPlannableResource struct {
*NodeAbstractResource
// TODO: can we eliminate the need for this flag and combine this with the
// apply expander?
// ForceCreateBeforeDestroy might be set via our GraphNodeDestroyerCBD
// during graph construction, if dependencies require us to force this
// on regardless of what the configuration says.

View File

@ -14,6 +14,11 @@ import (
"github.com/hashicorp/terraform/tfdiags"
)
// nodeExpandRefreshableResource handles the first layer of resource
// expansion durin refresh. We need this extra layer so DynamicExpand is called
// twice for the resource, the first to expand the Resource for each module
// instance, and the second to expand each ResourceInstance for the expanded
// Resources.
type nodeExpandRefreshableManagedResource struct {
*NodeAbstractResource