Skip to content

Commit

Permalink
comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardin committed Mar 25, 2020
1 parent 5810261 commit 4f1692c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
6 changes: 0 additions & 6 deletions terraform/eval_context_builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 0 additions & 2 deletions terraform/node_resource_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
9 changes: 1 addition & 8 deletions terraform/node_resource_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions terraform/node_resource_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4f1692c

Please sign in to comment.