mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
terraform: fix compilation from merge
This commit is contained in:
parent
0d1867c0b3
commit
4b3473e522
@ -551,8 +551,8 @@ func (c *walkContext) applyWalkFn() depgraph.WalkFunc {
|
||||
// was an error during the provider apply.
|
||||
tainted := false
|
||||
if applyerr == nil && createNew && len(r.Provisioners) > 0 {
|
||||
for _, h := range c.hooks {
|
||||
handleHook(h.PreProvisionResource(r.Id, is))
|
||||
for _, h := range c.Context.hooks {
|
||||
handleHook(h.PreProvisionResource(r.Info, is))
|
||||
}
|
||||
|
||||
if err := c.applyProvisioners(r, is); err != nil {
|
||||
|
@ -797,7 +797,7 @@ func TestContextApply_provisionerResourceRef(t *testing.T) {
|
||||
|
||||
// Provisioner should NOT run on a diff, only create
|
||||
func TestContextApply_Provisioner_Diff(t *testing.T) {
|
||||
c := testConfig(t, "apply-provisioner-diff")
|
||||
m := testModule(t, "apply-provisioner-diff")
|
||||
p := testProvider("aws")
|
||||
pr := testProvisioner()
|
||||
p.ApplyFn = testApplyFn
|
||||
@ -806,7 +806,7 @@ func TestContextApply_Provisioner_Diff(t *testing.T) {
|
||||
return nil
|
||||
}
|
||||
ctx := testContext(t, &ContextOpts{
|
||||
Config: c,
|
||||
Module: m,
|
||||
Providers: map[string]ResourceProviderFactory{
|
||||
"aws": testProviderFuncFixed(p),
|
||||
},
|
||||
@ -842,7 +842,7 @@ func TestContextApply_Provisioner_Diff(t *testing.T) {
|
||||
|
||||
// Re-create context with state
|
||||
ctx = testContext(t, &ContextOpts{
|
||||
Config: c,
|
||||
Module: m,
|
||||
Providers: map[string]ResourceProviderFactory{
|
||||
"aws": testProviderFuncFixed(p),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user