github.com/opentofu/opentofu@v1.7.1/internal/tofu/ui_output_provisioner.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package tofu 7 8 import ( 9 "github.com/opentofu/opentofu/internal/addrs" 10 ) 11 12 // ProvisionerUIOutput is an implementation of UIOutput that calls a hook 13 // for the output so that the hooks can handle it. 14 type ProvisionerUIOutput struct { 15 InstanceAddr addrs.AbsResourceInstance 16 ProvisionerType string 17 Hooks []Hook 18 } 19 20 func (o *ProvisionerUIOutput) Output(msg string) { 21 for _, h := range o.Hooks { 22 h.ProvisionOutput(o.InstanceAddr, o.ProvisionerType, msg) 23 } 24 }