mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
terraform: outputs in apply
This commit is contained in:
parent
a614f6105a
commit
9b7d1509fc
@ -2706,13 +2706,12 @@ func TestContext2Apply(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
func TestContext2Apply_emptyModule(t *testing.T) {
|
||||||
func TestContextApply_emptyModule(t *testing.T) {
|
|
||||||
m := testModule(t, "apply-empty-module")
|
m := testModule(t, "apply-empty-module")
|
||||||
p := testProvider("aws")
|
p := testProvider("aws")
|
||||||
p.ApplyFn = testApplyFn
|
p.ApplyFn = testApplyFn
|
||||||
p.DiffFn = testDiffFn
|
p.DiffFn = testDiffFn
|
||||||
ctx := testContext(t, &ContextOpts{
|
ctx := testContext2(t, &ContextOpts{
|
||||||
Module: m,
|
Module: m,
|
||||||
Providers: map[string]ResourceProviderFactory{
|
Providers: map[string]ResourceProviderFactory{
|
||||||
"aws": testProviderFuncFixed(p),
|
"aws": testProviderFuncFixed(p),
|
||||||
@ -2736,6 +2735,7 @@ func TestContextApply_emptyModule(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
func TestContextApply_createBeforeDestroy(t *testing.T) {
|
func TestContextApply_createBeforeDestroy(t *testing.T) {
|
||||||
m := testModule(t, "apply-good-create-before")
|
m := testModule(t, "apply-good-create-before")
|
||||||
p := testProvider("aws")
|
p := testProvider("aws")
|
||||||
|
@ -43,7 +43,15 @@ func (n *EvalApply) Eval(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: hooks
|
/*
|
||||||
|
// Call pre-apply hook
|
||||||
|
err := ctx.Hook(func(h Hook) (HookAction, error) {
|
||||||
|
return h.PreApply(n.Info, state, diff)
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// With the completed diff, apply!
|
// With the completed diff, apply!
|
||||||
log.Printf("[DEBUG] apply: %s: executing Apply", n.Info.Id)
|
log.Printf("[DEBUG] apply: %s: executing Apply", n.Info.Id)
|
||||||
|
@ -123,7 +123,7 @@ func (n *GraphNodeConfigOutput) DependentOn() []string {
|
|||||||
// GraphNodeEvalable impl.
|
// GraphNodeEvalable impl.
|
||||||
func (n *GraphNodeConfigOutput) EvalTree() EvalNode {
|
func (n *GraphNodeConfigOutput) EvalTree() EvalNode {
|
||||||
return &EvalOpFilter{
|
return &EvalOpFilter{
|
||||||
Ops: []walkOperation{walkRefresh, walkPlan},
|
Ops: []walkOperation{walkRefresh, walkPlan, walkApply},
|
||||||
Node: &EvalWriteOutput{
|
Node: &EvalWriteOutput{
|
||||||
Name: n.Output.Name,
|
Name: n.Output.Name,
|
||||||
Value: &EvalInterpolate{Config: n.Output.RawConfig},
|
Value: &EvalInterpolate{Config: n.Output.RawConfig},
|
||||||
|
Loading…
Reference in New Issue
Block a user