From a5825f907be3bca7edd53b76b56127df0656fd36 Mon Sep 17 00:00:00 2001 From: Sargurunathan Mohan Date: Tue, 3 May 2016 06:31:41 -0700 Subject: [PATCH] Fix launch_configuration error when using ebs which is encrypted --- builtin/providers/aws/resource_aws_launch_configuration.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_launch_configuration.go b/builtin/providers/aws/resource_aws_launch_configuration.go index 9607446dd..55256b9de 100644 --- a/builtin/providers/aws/resource_aws_launch_configuration.go +++ b/builtin/providers/aws/resource_aws_launch_configuration.go @@ -334,13 +334,16 @@ func resourceAwsLaunchConfigurationCreate(d *schema.ResourceData, meta interface bd := v.(map[string]interface{}) ebs := &autoscaling.Ebs{ DeleteOnTermination: aws.Bool(bd["delete_on_termination"].(bool)), - Encrypted: aws.Bool(bd["encrypted"].(bool)), } if v, ok := bd["snapshot_id"].(string); ok && 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 { ebs.VolumeSize = aws.Int64(int64(v)) }