You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
0.7.1
Affected Resource(s)
may effect one of these
aws_spot_instance_request
aws_instance
aws_iam_role
aws_iam_instance_profile
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
the spot request should finish without error "Invalid IAM Instance Profile name"
Actual Behaviour
on the first run (see debug output called first run), everything gets created, including iam_role and instance_profile, when the spot instance is requested, an error is produced as follows:
Error applying plan:
1 error(s) occurred:
* aws_spot_instance_request.consul_cluster: Error requesting spot instances: InvalidParameterValue: Value (consul_instance_profile) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name
status code: 400, request id: ce73435e-5018-4798-8942-6b47ec013d19
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.
However, this is not the case, when checking the iam_role and instance_profile using the aws cli tools, both are present and correct.
On running terraform apply a second time, the spot request is created with no errors, the iam_role and instance_profile are used from the previous run
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
change vars vpc_id and keypair in the config above
terraform apply we get a failure (debug run 1)
terraform apply the second time it works (debug run 2)
Important Factoids
n/a
References
N/A
The text was updated successfully, but these errors were encountered:
I believe I have a fix for this in my fork, i have wrapped the spot request with resource.retry, now spot requests with IAM Roles now work as expected, i have tested a number of times, works each time, the fix is here, richardbowden@687fdb8 i can make a pull request if someone is happy ?
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
locked and limited conversation to collaborators
Apr 7, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
0.7.1
Affected Resource(s)
may effect one of these
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
first run : https://gist.github.com/richardbowden/9221914de9d541f314addc9d2f1a5496
second run: https://gist.github.com/richardbowden/d5b7d22eff89ed375314d7d54dcb0325
Panic Output
n/a
Expected Behaviour
the spot request should finish without error "Invalid IAM Instance Profile name"
Actual Behaviour
on the first run (see debug output called first run), everything gets created, including iam_role and instance_profile, when the spot instance is requested, an error is produced as follows:
However, this is not the case, when checking the iam_role and instance_profile using the aws cli tools, both are present and correct.
On running
terraform apply
a second time, the spot request is created with no errors, the iam_role and instance_profile are used from the previous runSteps to Reproduce
Please list the steps required to reproduce the issue, for example:
vpc_id
andkeypair
in the config aboveterraform apply
we get a failure (debug run 1)terraform apply
the second time it works (debug run 2)Important Factoids
n/a
References
N/A
The text was updated successfully, but these errors were encountered: