-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
added support in batch for the allocation_strategy attribute #10894
Conversation
are there any updates on this? looks like it is almost good to go, just needs a review? |
We have been using this compiled fork in our production systems since I made this pull request. No problems so far. |
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.
Hi @sam-burrell 👋 Thank you for submitting this -- the implementation looks good from looking at the code changes, however we would prefer an additional acceptance test covering its usage to ensure it works as expected and to prevent future regressions with the functionality. See also the Contributing Guide section on enhancements. Please reach out if you have any questions or do not have time to implement the testing.
@@ -128,6 +128,7 @@ resource "aws_batch_compute_environment" "sample" { | |||
* `bid_percentage` - (Optional) Integer of minimum percentage that a Spot Instance price must be when compared with the On-Demand price for that instance type before instances are launched. For example, if your bid percentage is 20% (`20`), then the Spot price must be below 20% of the current On-Demand price for that EC2 instance. This parameter is required for SPOT compute environments. | |||
* `desired_vcpus` - (Optional) The desired number of EC2 vCPUS in the compute environment. | |||
* `ec2_key_pair` - (Optional) The EC2 key pair that is used for instances launched in the compute environment. | |||
* `allocation_strategy` - (Optional) The allocation strategy to use for the compute resource in case not enough instances of the best fitting instance type can be allocated. Valid items are `BEST_FIT_PROGRESSIVE`, `SPOT_CAPACITY_OPTIMIZED` or `BEST_FIT`. Defaults to `BEST_FIT`. |
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.
Nit: Can you please alphabetize this line item with the rest of the list? It might also be good to include a link to the Batch User Guide section on Allocation Strategies (https://docs.aws.amazon.com/batch/latest/userguide/allocation-strategies.html). Thanks.
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.
many thanks for the review, I have done both of these steps hopefully good to go
…pute_environment/compute_resources
@bflad thanks I have also rebased. |
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.
Looks great, @sam-burrell, thanks for the updates 🚀
Output from acceptance testing:
--- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithoutBidPercentage (16.57s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithoutComputeResources (16.91s)
--- PASS: TestAccAWSBatchComputeEnvironment_createWithNamePrefix (45.76s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanagedWithComputeResources (45.94s)
--- PASS: TestAccAWSBatchComputeEnvironment_createUnmanaged (51.64s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2WithTags (54.95s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpot (55.43s)
--- PASS: TestAccAWSBatchComputeEnvironment_createEc2 (56.19s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateState (57.01s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateMaxvCpus (57.76s)
--- PASS: TestAccAWSBatchComputeEnvironment_launchTemplate (62.81s)
--- PASS: TestAccAWSBatchComputeEnvironment_createSpotWithAllocationStrategy (68.44s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateInstanceType (77.81s)
--- PASS: TestAccAWSBatchComputeEnvironment_updateComputeEnvironmentName (79.77s)
--- PASS: TestAccAWSBatchComputeEnvironment_UpdateLaunchTemplate (88.16s)
This has been released in version 2.44.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! |
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! |
Community Note
Relates support new attribute
Release note for CHANGELOG:
Output from acceptance testing: