ebsvolume

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

The ebsvolume package contains a packer.Builder implementation that builds EBS volumes for Amazon EC2 using an ephemeral instance,

Index

Constants

View Source
const BuilderId = "mitchellh.amazon.ebsvolume"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact added in v0.12.1

type Artifact struct {
	// A map of regions to EBS Volume IDs.
	Volumes EbsVolumes

	// BuilderId is the unique ID for the builder that created this AMI
	BuilderIdValue string

	// EC2 connection for performing API stuff.
	Conn *ec2.EC2
}

Artifact is an artifact implementation that contains built AMIs.

func (*Artifact) BuilderId added in v0.12.1

func (a *Artifact) BuilderId() string

func (*Artifact) Destroy added in v0.12.1

func (a *Artifact) Destroy() error

func (*Artifact) Files added in v0.12.1

func (*Artifact) Files() []string

func (*Artifact) Id added in v0.12.1

func (a *Artifact) Id() string

func (*Artifact) State added in v0.12.1

func (a *Artifact) State(name string) interface{}

func (*Artifact) String added in v0.12.1

func (a *Artifact) String() string

type BlockDevice

type BlockDevice struct {
	awscommon.BlockDevice `mapstructure:",squash"`
	// Tags to apply to the volume. These are retained after the builder
	// completes. This is a [template engine](/docs/templates/engine.html), see
	// [Build template data](#build-template-data) for more information.
	Tags awscommon.TagMap `mapstructure:"tags" required:"false"`
}

type BlockDevices added in v1.4.4

type BlockDevices []BlockDevice

func (BlockDevices) BuildEC2BlockDeviceMappings added in v1.4.4

func (bds BlockDevices) BuildEC2BlockDeviceMappings() []*ec2.BlockDeviceMapping

func (BlockDevices) Prepare added in v1.4.4

func (bds BlockDevices) Prepare(ctx *interpolate.Context) (errs []error)

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) Prepare

func (b *Builder) Prepare(raws ...interface{}) ([]string, error)

func (*Builder) Run

func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (packer.Artifact, error)

type Config

type Config struct {
	common.PackerConfig    `mapstructure:",squash"`
	awscommon.AccessConfig `mapstructure:",squash"`
	awscommon.RunConfig    `mapstructure:",squash"`

	// Enable enhanced networking (ENA but not SriovNetSupport) on
	// HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your
	// AWS IAM policy. Note: you must make sure enhanced networking is enabled
	// on your instance. See [Amazon's documentation on enabling enhanced
	// networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
	AMIENASupport config.Trilean `mapstructure:"ena_support" required:"false"`
	// Enable enhanced networking (SriovNetSupport but not ENA) on
	// HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your
	// AWS IAM policy. Note: you must make sure enhanced networking is enabled
	// on your instance. See [Amazon's documentation on enabling enhanced
	// networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
	// Default `false`.
	AMISriovNetSupport bool `mapstructure:"sriov_support" required:"false"`

	// Add the block device mappings to the AMI. If you add instance store
	// volumes or EBS volumes in addition to the root device volume, the
	// created AMI will contain block device mapping information for those
	// volumes. Amazon creates snapshots of the source instance's root volume
	// and any other EBS volumes described here. When you launch an instance
	// from this new AMI, the instance automatically launches with these
	// additional volumes, and will restore them from snapshots taken from the
	// source instance. See the [BlockDevices](#block-devices-configuration)
	// documentation for fields.
	VolumeMappings BlockDevices `mapstructure:"ebs_volumes" required:"false"`
	// Tags to apply to the volumes of the instance that is *launched* to
	// create EBS Volumes. These tags will *not* appear in the tags of the
	// resulting EBS volumes unless they're duplicated under `tags` in the
	// `ebs_volumes` setting. This is a [template
	// engine](/docs/templates/engine.html), see [Build template
	// data](#build-template-data) for more information.
	//
	//  Note: The tags specified here will be *temporarily* applied to volumes
	// specified in `ebs_volumes` - but only while the instance is being
	// created. Packer will replace all tags on the volume with the tags
	// configured in the `ebs_volumes` section as soon as the instance is
	// reported as 'ready'.
	VolumeRunTags awscommon.TagMap `mapstructure:"run_volume_tags"`
	// contains filtered or unexported fields
}

type EbsVolumes added in v0.12.1

type EbsVolumes map[string][]string

map of region to list of volume IDs

type EngineVarsTemplate added in v1.3.4

type EngineVarsTemplate struct {
	BuildRegion string
	SourceAMI   string
}

Jump to

Keyboard shortcuts

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