-
Notifications
You must be signed in to change notification settings - Fork 10k
Closed
azavea/terraform-aws-ecs-cluster
#34Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/ec2Issues and PRs that pertain to the ec2 service.Issues and PRs that pertain to the ec2 service.
Milestone
Description
This issue was originally opened by @jayudhandha as hashicorp/terraform#18059. It was migrated here as a result of the provider split. The original body of the issue is below.
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!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/ec2Issues and PRs that pertain to the ec2 service.Issues and PRs that pertain to the ec2 service.