-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_launch_template with instance_market_options block causes ASG to error #5455
Comments
Hey! Thanks for writing in. I've verified this, unfortunately I can't find any documentation on AWS's documentation site that mentions it 😦 I think at this time we simply need to document it on both https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html and https://www.terraform.io/docs/providers/aws/r/launch_template.html#market-options . Adding a note on both pages to mention the limitation may be the best we can do for now. Here's a full config that reproduces this, for those curious.: resource "aws_launch_template" "foo" {
name = "cts"
block_device_mappings {
device_name = "test"
}
credit_specification {
cpu_credits = "standard"
}
disable_api_termination = true
ebs_optimized = true
elastic_gpu_specifications {
type = "test"
}
iam_instance_profile {
name = "test"
}
image_id = "ami-12a3b456"
instance_initiated_shutdown_behavior = "terminate"
instance_market_options {
market_type = "spot"
spot_options {
spot_instance_type = "one-time"
}
}
instance_type = "t2.micro"
kernel_id = "aki-a12bc3de"
key_name = "test"
monitoring {
enabled = true
}
network_interfaces {
network_interface_id = "eni-123456ab"
security_groups = ["sg-1a23bc45"]
}
placement {
availability_zone = "us-west-2b"
}
ram_disk_id = "ari-a12bc3de"
vpc_security_group_ids = ["sg-12a3b45c"]
tag_specifications {
resource_type = "instance"
tags {
Name = "test"
}
}
}
resource "aws_autoscaling_group" "bar" {
availability_zones = ["us-west-2a"]
name = "foobar3-terraform-test"
max_size = 1
min_size = 1
health_check_grace_period = 300
health_check_type = "ELB"
desired_capacity = 0
force_delete = true
termination_policies = [
"ClosestToNextInstanceHour",
"OldestLaunchConfiguration",
"OldestInstance",
"NewestInstance",
]
launch_template = {
id = "${aws_launch_template.foo.id}"
version = "$$Latest"
}
} |
The fix for this has been merged into master and will release with version 1.38.0 of the AWS provider, likely middle of this week. |
This has been released in version 1.38.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
0.11.7
Provider aws version 1.30
Affected Resource(s)
aws_launch_template
when aws_launch_template includes
This error is given:
The text was updated successfully, but these errors were encountered: