packerbuilderdata

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MPL-2.0 Imports: 1 Imported by: 21

Documentation

Overview

Package packerbuilderdata provides tooling for setting and getting special builder-generated data that will be passed to the provisioners. This data should be limited to runtime data like instance id, ip address, and other relevant details that provisioning scripts may need access to.

Index

Constants

View Source
const PlaceholderMsg = "To set this dynamically in the Packer template, " +
	"you must use the `build` function"

This is used in the BasicPlaceholderData() func in the packer/provisioner.go To force users to access generated data via the "generated" func.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratedData

type GeneratedData struct {
	// The builder's StateBag
	State multistep.StateBag
}

GeneratedData manages variables created and exported by a builder after it starts, so that provisioners and post-processors can have access to build data generated at runtime -- for example, instance ID or instance IP address. Internally, it uses the builder's multistep.StateBag. The user must make sure that the State field is not is not nil before calling Put().

func (*GeneratedData) Put

func (gd *GeneratedData) Put(key string, data interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL