add ExpectedRunDevice constant

This commit is contained in:
Marin Salinas 2019-02-12 15:12:19 -06:00 committed by Megan Marsh
parent c4e69d3169
commit a4966d9823
4 changed files with 7 additions and 3 deletions

View File

@ -145,7 +145,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
Debug: b.config.PackerDebug,
BsuOptimized: b.config.BsuOptimized,
EnableT2Unlimited: b.config.EnableT2Unlimited,
ExpectedRootDevice: "ebs", // should it be bsu
ExpectedRootDevice: osccommon.RunSourceVmBSUExpectedRootDevice,
IamVmProfile: b.config.IamVmProfile,
VmInitiatedShutdownBehavior: b.config.VmInitiatedShutdownBehavior,
VmType: b.config.VmType,

View File

@ -47,7 +47,7 @@ const testBuilderAccBasic = `
"type": "test",
"region": "eu-west-2",
"vm_type": "m3.medium",
"source_omi": "omi-76b2a71e",
"source_omi": "ami-76b2a71e",
"ssh_username": "ubuntu",
"omi_name": "packer-test {{timestamp}}"
}]

View File

@ -176,7 +176,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
Debug: b.config.PackerDebug,
BsuOptimized: b.config.BsuOptimized,
EnableT2Unlimited: b.config.EnableT2Unlimited,
ExpectedRootDevice: "ebs", // should it be bsu
ExpectedRootDevice: osccommon.RunSourceVmBSUExpectedRootDevice,
IamVmProfile: b.config.IamVmProfile,
VmInitiatedShutdownBehavior: b.config.VmInitiatedShutdownBehavior,
VmType: b.config.VmType,

View File

@ -18,6 +18,10 @@ import (
"github.com/hashicorp/packer/template/interpolate"
)
const (
RunSourceVmBSUExpectedRootDevice = "ebs"
)
type StepRunSourceVm struct {
AssociatePublicIpAddress bool
BlockDevices BlockDevices