-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_spot_instance_request fails when instance_interruption_behaviour is set to stop #2023
Comments
This is still happening with |
also happening with terraform 0.11.2 and provider 1.9.0 |
Still happening with |
Still happening with |
I found the code from PR 1986 is working well for my usage. |
Sorry for missing this earlier folks, but it looks like the fix for this was previously released awhile ago in version 1.15.0 of the AWS provider and has been available in all releases since. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. Two other notes:
|
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! |
This issue was originally opened by @kurron as hashicorp/terraform#16414. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform v0.10.7
Terraform Configuration Files
Debug Output
The log is large and can be found here. It appears that we are sending a
Placement
block in the JSON request when we might need to?Crash Output
None.
Expected Behavior
I should be able to select a
instance_interruption_behaviour
to a value ofstop
without an error.Actual Behavior
module.ec2_spot.aws_spot_instance_request.instance[2]: Creating...
ami: "" => "ami-29f80351"
associate_public_ip_address: "" => ""
availability_zone: "" => ""
ebs_block_device.#: "" => ""
ebs_optimized: "" => "false"
ephemeral_block_device.#: "" => ""
iam_instance_profile: "" => "docker-2017101819084555130000000b"
instance_interruption_behaviour: "" => "stop"
instance_state: "" => ""
instance_type: "" => "m3.medium"
ipv6_address_count: "" => ""
ipv6_addresses.#: "" => ""
key_name: "" => "bastion-20171020163037962500000001"
monitoring: "" => "true"
network_interface.#: "" => ""
network_interface_id: "" => ""
placement_group: "" => ""
primary_network_interface_id: "" => ""
private_dns: "" => ""
private_ip: "" => ""
public_dns: "" => ""
public_ip: "" => ""
root_block_device.#: "" => ""
security_groups.#: "" => ""
source_dest_check: "" => "true"
spot_bid_status: "" => ""
spot_instance_id: "" => ""
spot_price: "" => "0.0670"
spot_request_state: "" => ""
spot_type: "" => "persistent"
subnet_id: "" => "subnet-ac5f72f7"
tags.%: "" => "8"
tags.Creator: "" => "kurron@jvmguy.com"
tags.Duty: "" => "Docker"
tags.Environment: "" => "development"
tags.Freetext: "" => "No notes at this time."
tags.Name: "" => "Ultron 03"
tags.Project: "" => "Debug"
tags.Purpose: "" => "Runs Docker containers"
tags.Scheduled: "" => "Yes"
tenancy: "" => ""
volume_tags.%: "" => "6"
volume_tags.Creator: "" => "kurron@jvmguy.com"
volume_tags.Environment: "" => "development"
volume_tags.Freetext: "" => "No notes at this time."
volume_tags.Name: "" => "Ultron 03"
volume_tags.Project: "" => "Debug"
volume_tags.Purpose: "" => "Runs Docker containers"
vpc_security_group_ids.#: "" => "1"
vpc_security_group_ids.2717021527: "" => "sg-9cdab5e1"
wait_for_fulfillment: "" => "false"
Error applying plan:
3 error(s) occurred:
module.ec2_spot.aws_spot_instance_request.instance[1]: 1 error(s) occurred:
aws_spot_instance_request.instance.1: Error requesting spot instances: InvalidParameterCombination: The parameter GroupName within placement information cannot be specified when instanceInterruptionBehavior is set to 'stop'.
status code: 400, request id: 4d0aa070-41ed-4ce0-aa38-f623b35f9e67
module.ec2_spot.aws_spot_instance_request.instance[0]: 1 error(s) occurred:
aws_spot_instance_request.instance.0: Error requesting spot instances: InvalidParameterCombination: The parameter GroupName within placement information cannot be specified when instanceInterruptionBehavior is set to 'stop'.
status code: 400, request id: f04661d5-0324-47f5-97ca-68ad0d1c0bc9
module.ec2_spot.aws_spot_instance_request.instance[2]: 1 error(s) occurred:
aws_spot_instance_request.instance.2: Error requesting spot instances: InvalidParameterCombination: The parameter GroupName within placement information cannot be specified when instanceInterruptionBehavior is set to 'stop'.
status code: 400, request id: 1cca1b36-19f6-4403-b676-6a0902135545
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
Steps to Reproduce
git clone https://github.com/kurron/terraform-aws-ec2-spot.git
debug/debug-module.sh
debug/plan.tf
to use different valuesImportant Factoids
Same plan but using a value of
terminate
works. I wonder if we are sending placement information we don't need to. I am specifying the subnets, which are available in all AZs, to install to.References
I could not find any.
The text was updated successfully, but these errors were encountered: