Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified #18059

Closed
jayudhandha opened this issue May 16, 2018 · 2 comments

Comments

@jayudhandha
Copy link

Hi,

I am migrating my Autoscaling groups to use launch_template instead of launch_configuration. (To support T2 Unlimited)

Below is my code snippet.

resource "aws_launch_template" "test_launch_template" {
  image_id = "ami_id"
  name_prefix     = "test-pref"
  instance_type   = "t2.small"
  key_name        = "jayesh"
  vpc_security_group_ids = ["sg-23423432","sg-23452115"]
  user_data       = "${base64encode(data.template_file.user_data.rendered)}"
  
  iam_instance_profile {
	name = "test"
  } 
  disable_api_termination = true
  instance_initiated_shutdown_behavior = "terminate"

  block_device_mappings {
	device_name = "/dev/sda1"
	ebs {
      delete_on_termination = true
      volume_size           = "${var.volume_size}"
    }
  }
    
  credit_specification {
    cpu_credits = "unlimited"
  }
  lifecycle {
    create_before_destroy = "true"
  }  
}

While running terraform apply I am getting below error.

1 error(s) occurred:

  • aws_autoscaling_group.test_asg: 1 error(s) occurred:
  • aws_autoscaling_group.test_asg: Error creating AutoScaling Group: ValidationError: You must use a valid fully-formed launch template. the encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified.
    status code: 400, request id: 7902a390-58de-11e8-af77-87d327f8b121

May be any parameter is missing but i am not sure which one.

As per error, It looks that encrypted parameter is specified. But i haven't passed that. Then why this error is coming?

Thanks in advance!

@ghost
Copy link

ghost commented May 16, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#4553 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#4553.

@ghost ghost closed this as completed May 16, 2018
@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants