builder/amazon/ebs: Add config for target AZ.
Fixes [GH-536]
This commit is contained in:
parent
5b1463f77b
commit
60428cef60
|
@ -1,6 +1,9 @@
|
|||
## 0.4.0 (unreleased)
|
||||
|
||||
FEATURES:
|
||||
|
||||
* builder/amazon/ebs: Ability to specify which availability zone to create
|
||||
instance in. [GH-536]
|
||||
|
||||
## 0.3.10 (October 20, 2013)
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ type RunConfig struct {
|
|||
SubnetId string `mapstructure:"subnet_id"`
|
||||
TemporaryKeyPairName string `mapstructure:"temporary_key_pair_name"`
|
||||
VpcId string `mapstructure:"vpc_id"`
|
||||
AvailZone string `mapstructure:"avail_zone"`
|
||||
|
||||
// Unexported fields that are calculated from others
|
||||
sshTimeout time.Duration
|
||||
|
@ -83,6 +84,7 @@ func (c *RunConfig) Prepare(t *packer.ConfigTemplate) []error {
|
|||
"subnet_id": &c.SubnetId,
|
||||
"temporary_key_pair_name": &c.TemporaryKeyPairName,
|
||||
"vpc_id": &c.VpcId,
|
||||
"avail_zone": &c.AvailZone,
|
||||
}
|
||||
|
||||
for n, ptr := range templates {
|
||||
|
|
|
@ -101,6 +101,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
|||
SourceAMI: b.config.SourceAmi,
|
||||
IamInstanceProfile: b.config.IamInstanceProfile,
|
||||
SubnetId: b.config.SubnetId,
|
||||
AvailZone: b.config.AvailZone,
|
||||
BlockDevices: b.config.BlockDevices,
|
||||
},
|
||||
&common.StepConnectSSH{
|
||||
|
|
|
@ -120,6 +120,9 @@ Optional:
|
|||
* `vpc_id` (string) - If launching into a VPC subnet, Packer needs the
|
||||
VPC ID in order to create a temporary security group within the VPC.
|
||||
|
||||
* `avail_zone` (string) - Destination availability zone to launch instance in.
|
||||
Leave this empty to allow Amazon to auto-assign..
|
||||
|
||||
## Basic Example
|
||||
|
||||
Here is a basic example. It is completely valid except for the access keys:
|
||||
|
|
Loading…
Reference in New Issue