title: Terraform: Encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified
body: <p>I am migrating my <strong>Autoscaling groups</strong> to use <strong>launch_template</strong> instead of <strong>launch_configuration</strong>. (<em>To support T2 Unlimited</em>)</p>
  <p>Below is my code snippet.</p>
  <pre><code>resource &quot;aws_launch_template&quot; &quot;test_launch_template&quot; {
    image_id = &quot;ami_id&quot;
    name_prefix     = &quot;test-pref&quot;
    instance_type   = &quot;t2.small&quot;
    key_name        = &quot;jayesh&quot;
    vpc_security_group_ids = [&quot;sg-23423432&quot;,&quot;sg-23452115&quot;]
    user_data       = &quot;${base64encode(data.template_file.user_data.rendered)}&quot;
    
    iam_instance_profile {
      name = &quot;test&quot;
    } 
    disable_api_termination = true
    instance_initiated_shutdown_behavior = &quot;terminate&quot;
  
    block_device_mappings {
      device_name = &quot;/dev/sda1&quot;
      ebs {
        delete_on_termination = true
        volume_size           = &quot;${var.volume_size}&quot;
      }
    }
      
    credit_specification {
      cpu_credits = &quot;unlimited&quot;
    }
    lifecycle {
      create_before_destroy = &quot;true&quot;
    }  
  }
  </code></pre>
  <p>While running terraform apply I am getting below error.</p>
  <blockquote>
  <p>1 error(s) occurred:</p>
  <p>aws_autoscaling_group.test_asg: 1 error(s) occurred:</p>
  <p>aws_autoscaling_group.test_asg: Error creating AutoScaling Group:</p>
  <p>ValidationError: You must use a valid fully-formed launch template.
  the encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified.</p>
  <p>status code: 400, request id: 7902a390-58de-11e8-af77-87d327f8b121</p>
  </blockquote>
  <p>May be any parameter is missing but i am not sure which one.</p>
  <p>As per error, It looks that encrypted parameter is specified. But i haven't passed that. Then why this error is coming?</p>
  <p>Thanks in advance!</p>