Use pointers in the AWS API
This commit is contained in:
parent
9385a277c6
commit
48d242a8f8
|
@ -75,7 +75,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
||||||
// If the subnet is specified but not the AZ, try to determine the AZ automatically
|
// If the subnet is specified but not the AZ, try to determine the AZ automatically
|
||||||
if b.config.SubnetId != "" && b.config.AvailabilityZone == "" {
|
if b.config.SubnetId != "" && b.config.AvailabilityZone == "" {
|
||||||
log.Printf("[INFO] Finding AZ for the given subnet '%s'", b.config.SubnetId)
|
log.Printf("[INFO] Finding AZ for the given subnet '%s'", b.config.SubnetId)
|
||||||
resp, err := ec2conn.DescribeSubnets(&ec2.DescribeSubnetsInput{SubnetIds: []string{b.config.SubnetId}})
|
resp, err := ec2conn.DescribeSubnets(&ec2.DescribeSubnetsInput{SubnetIds: []*string{&b.config.SubnetId}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
||||||
// If the subnet is specified but not the AZ, try to determine the AZ automatically
|
// If the subnet is specified but not the AZ, try to determine the AZ automatically
|
||||||
if b.config.SubnetId != "" && b.config.AvailabilityZone == "" {
|
if b.config.SubnetId != "" && b.config.AvailabilityZone == "" {
|
||||||
log.Printf("[INFO] Finding AZ for the given subnet '%s'", b.config.SubnetId)
|
log.Printf("[INFO] Finding AZ for the given subnet '%s'", b.config.SubnetId)
|
||||||
resp, err := ec2conn.DescribeSubnets(&ec2.DescribeSubnetsInput{SubnetIds: []string{b.config.SubnetId}})
|
resp, err := ec2conn.DescribeSubnets(&ec2.DescribeSubnetsInput{SubnetIds: []*string{&b.config.SubnetId}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue