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

aws_spot_fleet_request valid_until doesn't support indefinite requests #12755

Closed
quintok opened this issue Apr 10, 2020 · 4 comments · Fixed by #9718
Closed

aws_spot_fleet_request valid_until doesn't support indefinite requests #12755

quintok opened this issue Apr 10, 2020 · 4 comments · Fixed by #9718
Assignees
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@quintok
Copy link
Contributor

quintok commented Apr 10, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.24

  • provider.aws v2.56.0

Affected Resource(s)

  • aws_spot_fleet_request

Terraform Configuration Files

resource "aws_spot_fleet_request" "cluster" {
...
  valid_until = "2020-05-06T23:53:38Z"
...
}

Expected Behavior

The AWS API says valid_until is an optional parameter. Unfortunately the terraform implementation defaults to 24 hours. I don't see a way I can configure this resource to get it to behave like the aws default behaviour of "until the spot request is cancelled" - see ValidUntil in https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html

Actual Behavior

defaults to 24 hours, has no obvious way to set it to "until the request is cancelled"

Potential workarounds I thought of short term are:

  • Set a ridiculous date in the future, not sure if the AWS API has issues with that.
  • Have a null_resource call the aws api to remove the value and set that value as a ignore_changes proeprty in tf.
@ghost ghost added the service/ec2 Issues and PRs that pertain to the ec2 service. label Apr 10, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 10, 2020
@ewbankkit
Copy link
Contributor

@quintok Thanks for raising this.
It looks like #9718 will address it.

@bflad bflad added breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 10, 2020
@bflad bflad added this to the v3.0.0 milestone Apr 10, 2020
@bflad bflad linked a pull request Apr 10, 2020 that will close this issue
@bflad
Copy link
Member

bflad commented Jul 13, 2020

The change to allow the valid_until argument to no longer default to 24 hours has been merged and will release with version 3.0.0 of the Terraform AWS Provider, likely in two weeks. Thanks to @jkburges for the implementation. 👍

@bflad bflad self-assigned this Jul 13, 2020
@ghost
Copy link

ghost commented Jul 31, 2020

This has been released in version 3.0.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Aug 13, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants