Skip to content

Commit

Permalink
Fix launch_configuration error when using ebs which is encrypted
Browse files Browse the repository at this point in the history
  • Loading branch information
Sargurunathan Mohan committed May 3, 2016
1 parent 8465619 commit fea984a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builtin/providers/aws/resource_aws_launch_configuration.go
Expand Up @@ -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))
}
Expand Down

0 comments on commit fea984a

Please sign in to comment.