Fix launch_configuration error when using ebs which is encrypted
This commit is contained in:
parent
175f7bb436
commit
a5825f907b
|
@ -334,13 +334,16 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface
|
||||||
bd := v.(map[string]interface{})
|
bd := v.(map[string]interface{})
|
||||||
ebs := &autoscaling.Ebs{
|
ebs := &autoscaling.Ebs{
|
||||||
DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)),
|
DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)),
|
||||||
Encrypted: aws.Bool(bd["encrypted"].(bool)),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := bd["snapshot_id"].(string); ok && v != "" {
|
if v, ok := bd["snapshot_id"].(string); ok && v != "" {
|
||||||
ebs.SnapshotId = aws.String(v)
|
ebs.SnapshotId = aws.String(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if v, ok := bd["encrypted"].(bool); ok && v {
|
||||||
|
ebs.Encrypted = aws.Bool(v)
|
||||||
|
}
|
||||||
|
|
||||||
if v, ok := bd["volume_size"].(int); ok && v != 0 {
|
if v, ok := bd["volume_size"].(int); ok && v != 0 {
|
||||||
ebs.VolumeSize = aws.Int64(int64(v))
|
ebs.VolumeSize = aws.Int64(int64(v))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue