Terraform-provider-aws: Impossible for `aws_emr_cluster` workers to be spot instances?

Created on 13 Jun 2017  ยท  4Comments  ยท  Source: hashicorp/terraform-provider-aws

_This issue was originally opened by @fosskers as hashicorp/terraform#10324. It was migrated here as part of the provider split. The original body of the issue is below._


Terraform Version

Terraform v0.7.11

Affected Resource(s)

  • aws_emr_cluster
  • (maybe) aws_spot_instance_request

Expected Behaviour

When running Spark apps on EMR, it's common to use an on-demand master node with the workers as spot instances. I expected to be able to set spot_price (as elsewhere) in resource "aws_emr_cluster" ..., but that doesn't seem possible.

When using the aws emr CL tool manually, setting BidPrice=... as is done here automatically makes each node a spot instance. Otherwise, it's assumed as on-demand.

Questions:

  • Is this already possible with terraform, and I'm just missing something?
  • If so, is it that aws_spot_instance_request needs to be connected to aws_emr_cluster somehow?
  • Or, do I need to provide a custom launch configuration?

I haven't found anyone mention this on this repo or elsewhere, which is surprising, unless I'm just an idiot.

Thank you kindly.

bug servicemr

Most helpful comment

Note: I am working on a PR to address this. I expect to have something ready in the next day or two.

All 4 comments

If implemented, this would save people who use Spark on EMR a lot of money.

Note: I am working on a PR to address this. I expect to have something ready in the next day or two.

This was previously released in version 1.0.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.

instance_group and bid_price documentation available here: https://www.terraform.io/docs/providers/aws/r/emr_cluster.html#bid_price

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!

Was this page helpful?
0 / 5 - 0 ratings