packerbuilderdata

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MPL-2.0 Imports: 1 Imported by: 18 modules, 24 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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