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

IAM Role creation race stil present in spot instance requests #17457

Closed
stadeltobi opened this issue Feb 27, 2018 · 2 comments
Closed

IAM Role creation race stil present in spot instance requests #17457

stadeltobi opened this issue Feb 27, 2018 · 2 comments

Comments

@stadeltobi
Copy link

Terraform Version

Terraform v0.10.2

resource "aws_spot_instance_request" "quick-sir" {
  ami = "ami-5652ce39"
  instance_type = "t2.xlarge"
  spot_price = ".15"
  wait_for_fulfillment = true
  vpc_security_group_ids = <...>
  key_name = <...>
  iam_instance_profile = "${aws_iam_instance_profile.foo.id}"
  user_data = "${data.template_file.cloud-init.rendered}"
}

...

Additional Context

I'm having the equivalent issue that is described in #15341 when, instead of trying to create an aws_instance, I use a aws_spot_instance_request.

The same error ("Invalid Parameter Value") is thrown, so I'm assuming that the race condition described above was fixed for regular (on-demand) instances still prevails for spot_instance_requests.

Also, the workaround suggested by @spanktar makes the problem go away.

The problem goes away if I switch the spot request resource with an aws_instance resource, using the exact same parameters (except for the ones like spot_price that don't apply for aws_instance

References

@ghost
Copy link

ghost commented Feb 28, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#3554 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#3554.

@ghost
Copy link

ghost commented Apr 4, 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 4, 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