add some more comments
This commit is contained in:
parent
d47f151bf9
commit
a125f81fba
@ -23,12 +23,17 @@ import (
|
|||||||
// <nothing>
|
// <nothing>
|
||||||
|
|
||||||
func PopulateProvisionHookData(state multistep.StateBag) map[string]interface{} {
|
func PopulateProvisionHookData(state multistep.StateBag) map[string]interface{} {
|
||||||
hookData := map[string]interface{}{}
|
// Load Builder hook data from state, if it has been set.
|
||||||
|
// hookData := state.GetOk("generated_data").(map[string]interface{})
|
||||||
|
|
||||||
// instance_id is placed in state by the builders.
|
// instance_id is placed in state by the builders.
|
||||||
// Not yet implemented in Chroot, lxc/lxd, Azure, Qemu.
|
// Not yet implemented in Chroot, lxc/lxd, Azure, Qemu.
|
||||||
// Implemented in most others including digitalOcean (droplet id),
|
// Implemented in most others including digitalOcean (droplet id),
|
||||||
// docker (container_id), and clouds which use "server" internally instead
|
// docker (container_id), and clouds which use "server" internally instead
|
||||||
// of instance.
|
// of instance.
|
||||||
|
|
||||||
|
// Also note that Chroot and lxc/lxd builders tend to have their own custom
|
||||||
|
// step_provision, so they won't use this code path.
|
||||||
id, ok := state.GetOk("instance_id")
|
id, ok := state.GetOk("instance_id")
|
||||||
if ok {
|
if ok {
|
||||||
hookData["ID"] = id
|
hookData["ID"] = id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user