providers/aws: fix LCs being invalid in classic

Turns out AssociatePublicIPAddress was always being set, but the AWS
APIs don't like that when you're launching into EC2 Classic and return a
validation error at ASG launch time.

Fixes #1410
This commit is contained in:
Paul Hinze 2015-04-07 13:08:09 -05:00
parent 23c0fb7695
commit ee7ccb7908
1 changed files with 1 additions and 3 deletions

View File

@ -278,10 +278,8 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface
createLaunchConfigurationOpts.PlacementTenancy = aws.String(v.(string))
}
if v := d.Get("associate_public_ip_address"); v != nil {
if v, ok := d.GetOk("associate_public_ip_address"); ok {
createLaunchConfigurationOpts.AssociatePublicIPAddress = aws.Boolean(v.(bool))
} else {
createLaunchConfigurationOpts.AssociatePublicIPAddress = aws.Boolean(false)
}
if v, ok := d.GetOk("key_name"); ok {