packer_manifest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLastBuiltAmiIdFromPackerManifest

func GetLastBuiltAmiIdFromPackerManifest(
	packerManifestAbsPath string,
) (string, error)

Returns the AMI ID of the last built AMI. The AMI ID is extracted from the Packer manifest file.

Example:

("packer/aws/manifest.json") -> ("ami-0c3fd0f5d33134a76", nil)

func PickAmiId

func PickAmiId(
	lastBuildAmiId,
	amiIdFromConfig string,
) (string, error)

Returns the AMI ID to be used for deployment. The lastBuildAmiId can't be empty.

Example:

("ami-1234567890abcdef0", "") -> "ami-1234567890abcdef0", nil

Types

type PackerBuild

type PackerBuild struct {
	PackerRunUUID string `json:"packer_run_uuid"`
	ArtifactId    string `json:"artifact_id"`
}

type PackerManifest

type PackerManifest struct {
	Builds      []*PackerBuild
	LastRunUUID string `json:"last_run_uuid"`
}

Jump to

Keyboard shortcuts

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