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

Error when instance type isn't available in region / AZ #4

Open
chrispicht opened this issue Mar 10, 2022 · 1 comment
Open

Error when instance type isn't available in region / AZ #4

chrispicht opened this issue Mar 10, 2022 · 1 comment
Assignees

Comments

@chrispicht
Copy link


│ Error: no EC2 Spot Price History found matching criteria; try different search

│ with module.ec2_spot_price.data.aws_ec2_spot_price.this["ca-central-1d/r5a.xlarge"],
│ on .terraform.067342976165-ca-central-1/modules/ec2_spot_price/main.tf line 6, in data "aws_ec2_spot_price" "this":
│ 6: data "aws_ec2_spot_price" "this" {

@cageyv cageyv self-assigned this Mar 10, 2022
@cageyv
Copy link
Member

cageyv commented Mar 10, 2022

this happens when there is no selected instance type in the selected region or az
hashicorp/terraform-provider-aws#17446

in provider version 4.0+ this behavior could be fixed
I saw a lot of work related to similar issues inside another data sources
https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#400-february-10-2022

the solution for now:

  • pass only the first 3 AZ (1a,1b,1c) to the module and take the price based on them
  • pass another type of instance that is close or often close in price, but greater, for example, r5.xlarge in that case

@Andrey9kin Andrey9kin moved this to Icebox in Open source Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Icebox
Development

No branches or pull requests

2 participants