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

Allow creation of everlasting spot fleet requests #9718

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

jkburges
Copy link
Contributor

@jkburges jkburges commented Aug 11, 2019

According to the AWS API doc, if valid until is not set, then the spot fleet request "remains until you cancel it". By having a 24 hr default, then this behaviour cannot be achieved using this terraform provider - so the default it removed.

Some conversation about the default: 5bafd4b#r34628957
The relevant AWS doc: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

ENHANCEMENTS:

* resource/aws_spot_fleet_request: Remove 24 hr default for `valid_until`

@jkburges jkburges requested a review from a team August 11, 2019 23:58
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. labels Aug 11, 2019
According to the AWS API doc, if `valid until` is _not_ set, then the spot fleet request "remains until you cancel it". By having a 24 hr default, then this behaviour cannot be achieved using this terraform provider - so the default it removed.

Some conversation about the default: hashicorp@5bafd4b#r34628957
The relevant AWS doc: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html
@jkburges
Copy link
Contributor Author

I have no idea why pr-filter-sync is failing, can someone guide me?

@rdhatt
Copy link

rdhatt commented Jan 8, 2020

I just got bit by this as well. It is an odd arbitrary default value and leads to workaround like this:

https://www.reddit.com/r/aws/comments/8t3373/whats_up_with_spot_fleet_request_valid_until/e14ilye/

Can we tickle this PR so the review bot will look at it again? The logs from the previous run are gone.

@jkburges jkburges closed this Jan 8, 2020
@jkburges jkburges reopened this Jan 8, 2020
@jkburges
Copy link
Contributor Author

jkburges commented Jan 8, 2020

Can we tickle this PR so the review bot will look at it again?

I am currently trying to figure out how to do this.

@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. labels Apr 8, 2020
@bflad bflad added this to the v3.0.0 milestone Apr 8, 2020
@bflad bflad linked an issue Apr 10, 2020 that may be closed by this pull request
@bflad bflad self-assigned this Jul 13, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after fixing the merge conflict, thanks @jkburges 🚀

Output from acceptance testing:

--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId (113.80s)
--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId (113.50s)
--- PASS: TestAccAWSSpotFleetRequest_WithELBs (235.61s)
--- PASS: TestAccAWSSpotFleetRequest_WithTargetGroups (442.58s)
--- PASS: TestAccAWSSpotFleetRequest_associatePublicIpAddress (262.34s)
--- PASS: TestAccAWSSpotFleetRequest_basic (594.58s)
--- PASS: TestAccAWSSpotFleetRequest_changePriceForcesNewRequest (886.41s)
--- PASS: TestAccAWSSpotFleetRequest_disappears (606.81s)
--- PASS: TestAccAWSSpotFleetRequest_diversifiedAllocation (297.72s)
--- PASS: TestAccAWSSpotFleetRequest_fleetType (596.52s)
--- PASS: TestAccAWSSpotFleetRequest_iamInstanceProfileArn (600.46s)
--- PASS: TestAccAWSSpotFleetRequest_instanceInterruptionBehavior (377.27s)
--- PASS: TestAccAWSSpotFleetRequest_launchSpecToLaunchTemplate (572.48s)
--- PASS: TestAccAWSSpotFleetRequest_launchTemplate (316.61s)
--- PASS: TestAccAWSSpotFleetRequest_launchTemplateToLaunchSpec (511.71s)
--- PASS: TestAccAWSSpotFleetRequest_launchTemplateWithOverrides (274.95s)
--- PASS: TestAccAWSSpotFleetRequest_launchTemplate_multiple (225.88s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList (223.90s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion (595.91s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList (222.91s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstancePools (370.43s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz (295.97s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet (272.91s)
--- PASS: TestAccAWSSpotFleetRequest_overriddingSpotPrice (315.56s)
--- PASS: TestAccAWSSpotFleetRequest_placementTenancyAndGroup (58.75s)
--- PASS: TestAccAWSSpotFleetRequest_tags (312.62s)
--- PASS: TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy (814.76s)
--- PASS: TestAccAWSSpotFleetRequest_updateTargetCapacity (878.48s)
--- PASS: TestAccAWSSpotFleetRequest_withEBSDisk (595.56s)
--- PASS: TestAccAWSSpotFleetRequest_withTags (597.37s)
--- PASS: TestAccAWSSpotFleetRequest_withWeightedCapacity (304.19s)
--- PASS: TestAccAWSSpotFleetRequest_withoutSpotPrice (282.35s)

bflad added a commit that referenced this pull request Jul 13, 2020
@bflad bflad merged commit 90e2af8 into hashicorp:master Jul 13, 2020
@jkburges jkburges deleted the make-valid-until-optional branch July 14, 2020 00:32
bflad added a commit that referenced this pull request Jul 14, 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. documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_spot_fleet_request valid_until doesn't support indefinite requests
3 participants