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:
parent
23c0fb7695
commit
ee7ccb7908
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue