mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
clarify apply hook usage
This commit is contained in:
parent
bc084858b1
commit
e5a6806206
@ -39,10 +39,12 @@ func (c *Context) Apply(plan *plans.Plan, config *configs.Config) (*states.State
|
||||
}
|
||||
|
||||
for _, rc := range plan.Changes.Resources {
|
||||
// import is a no-op change, but we'd like to show some helpful output that mirrors
|
||||
// the way we show other changes.
|
||||
// Import is a no-op change during an apply (all the real action happens during the plan) but we'd
|
||||
// like to show some helpful output that mirrors the way we show other changes.
|
||||
if rc.Importing != nil {
|
||||
for _, h := range c.hooks {
|
||||
// In future, we may need to call PostApplyImport separately elsewhere in the apply
|
||||
// operation. For now, though, we'll call Pre and Post hooks together.
|
||||
h.PreApplyImport(rc.Addr, *rc.Importing)
|
||||
h.PostApplyImport(rc.Addr, *rc.Importing)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user