When aws_batch_compute_environment properties such as image_id or instances_types is changed an in-place update of the compute environment should occur. This is not working when allocation_strategy is SPOT_PRICE_CAPACITY_OPTIMIZED. It does work for SPOT_CAPACITY_OPTIMIZED.
Actual Behavior
The plan indicates that the aws_batch_compute_environment must be replaced, which will destroy the compute environment instead.
Create an aws_batch_compute_environment with Terraform. compute_resources type should be SPOT and allocation_strategy should be SPOT_PRICE_CAPACITY_OPTIMIZED. Include an instance_type value, such as ["m7i"].
Plan and apply the Terraform.
Change the instance type to a different value, such as ["r7i"].
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.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.6.6
AWS Provider Version
5.61.0
Affected Resource(s)
aws_batch_compute_environment
Expected Behavior
When aws_batch_compute_environment properties such as image_id or instances_types is changed an in-place update of the compute environment should occur. This is not working when allocation_strategy is SPOT_PRICE_CAPACITY_OPTIMIZED. It does work for SPOT_CAPACITY_OPTIMIZED.
Actual Behavior
The plan indicates that the aws_batch_compute_environment must be replaced, which will destroy the compute environment instead.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None