-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Spot price optional for SIR, SFR #4424
Conversation
@@ -1511,6 +1511,87 @@ resource "aws_spot_fleet_request" "foo" { | |||
`, rName, rInt, rInt, rName) | |||
} | |||
|
|||
func testAccAWSSpotFleetRequestConfigWithoutSpotPrice(rName string, rInt int) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is in great shape -- only item is that this new test configuration does not look like its being called. If you fix that up then we should be able to get this in 👍
59e1505
to
1588469
Compare
@bflad I added the call and squashed the commits. (But, I find I get 100% pass on tests that are never called. 👍 ) |
You should get this made into a poster, I would buy it! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was good except it was failing the new acceptance test:
=== RUN TestAccAWSSpotFleetRequest_withoutSpotPrice
--- FAIL: TestAccAWSSpotFleetRequest_withoutSpotPrice (611.19s)
testing.go:518: Step 0 error: Error applying: 1 error(s) occurred:
* aws_spot_fleet_request.foo: 1 error(s) occurred:
* aws_spot_fleet_request.foo: Error requesting spot fleet: [WARN] Error creating Spot fleet request, retrying: InvalidSpotFleetRequestConfig: Parameter: SpotFleetRequestConfig.SpotPrice is invalid.
status code: 400, request id: 92438345-84ab-4f69-8c94-e3e33f3bc778
I added a very simple commit after yours to fix this logic: 1775af4
Now passes all acceptance testing:
28 tests passed (all tests)
=== RUN TestAccAWSSpotFleetRequest_placementTenancy
--- PASS: TestAccAWSSpotFleetRequest_placementTenancy (65.83s)
=== RUN TestAccAWSSpotInstanceRequest_basic
--- PASS: TestAccAWSSpotInstanceRequest_basic (97.40s)
=== RUN TestAccAWSSpotInstanceRequest_withBlockDuration
--- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (117.69s)
=== RUN TestAccAWSSpotInstanceRequest_withLaunchGroup
--- PASS: TestAccAWSSpotInstanceRequest_withLaunchGroup (159.11s)
=== RUN TestAccAWSSpotInstanceRequest_vpc
--- PASS: TestAccAWSSpotInstanceRequest_vpc (105.19s)
=== RUN TestAccAWSSpotInstanceRequest_validUntil
--- PASS: TestAccAWSSpotInstanceRequest_validUntil (120.20s)
=== RUN TestAccAWSSpotFleetRequest_diversifiedAllocation
--- PASS: TestAccAWSSpotFleetRequest_diversifiedAllocation (277.25s)
=== RUN TestAccAWSSpotFleetRequest_withoutSpotPrice
--- PASS: TestAccAWSSpotFleetRequest_withoutSpotPrice (277.86s)
=== RUN TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz (283.10s)
=== RUN TestAccAWSSpotFleetRequest_withTags
--- PASS: TestAccAWSSpotFleetRequest_withTags (291.90s)
=== RUN TestAccAWSSpotFleetRequest_overriddingSpotPrice
--- PASS: TestAccAWSSpotFleetRequest_overriddingSpotPrice (345.10s)
=== RUN TestAccAWSSpotFleetRequest_withEBSDisk
--- PASS: TestAccAWSSpotFleetRequest_withEBSDisk (346.76s)
=== RUN TestAccAWSSpotFleetRequest_instanceInterruptionBehavior
--- PASS: TestAccAWSSpotFleetRequest_instanceInterruptionBehavior (350.67s)
=== RUN TestAccAWSSpotFleetRequest_withWeightedCapacity
--- PASS: TestAccAWSSpotFleetRequest_withWeightedCapacity (350.88s)
=== RUN TestAccAWSSpotFleetRequest_associatePublicIpAddress
--- PASS: TestAccAWSSpotFleetRequest_associatePublicIpAddress (351.47s)
=== RUN TestAccAWSSpotInstanceRequestInterruptStop
--- PASS: TestAccAWSSpotInstanceRequestInterruptStop (74.21s)
=== RUN TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList (352.55s)
=== RUN TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet (353.52s)
=== RUN TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion (357.92s)
=== RUN TestAccAWSSpotInstanceRequestInterruptHibernate
--- PASS: TestAccAWSSpotInstanceRequestInterruptHibernate (93.35s)
=== RUN TestAccAWSSpotFleetRequest_WithELBs
--- PASS: TestAccAWSSpotFleetRequest_WithELBs (371.63s)
=== RUN TestAccAWSSpotInstanceRequest_withoutSpotPrice
--- PASS: TestAccAWSSpotInstanceRequest_withoutSpotPrice (255.71s)
=== RUN TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList (400.98s)
=== RUN TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes
--- PASS: TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes (269.25s)
=== RUN TestAccAWSSpotFleetRequest_WithTargetGroups
--- PASS: TestAccAWSSpotFleetRequest_WithTargetGroups (450.56s)
=== RUN TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress
--- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress (298.71s)
=== RUN TestAccAWSSpotInstanceRequest_getPasswordData
--- PASS: TestAccAWSSpotInstanceRequest_getPasswordData (339.58s)
=== RUN TestAccAWSSpotFleetRequest_changePriceForcesNewRequest
--- PASS: TestAccAWSSpotFleetRequest_changePriceForcesNewRequest (608.02s)
@bflad This is phenomenal! Thanks for your help and merge. When I get those t-shirts made, you'll get the first. |
This has been released in version 1.18.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
Code + tests + docs
Fixes #3548, formerly #3549 (closed)