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

Fix missing arguments in spot_options block for aws_ec2_fleet resource #41272

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ElioDiNino
Copy link

@ElioDiNino ElioDiNino commented Feb 6, 2025

Description

Implement the missing spot_options arguments from #41237

The code is pretty much copy and pasted from the on_demand_options implementation of the same arguments.

Relations

Closes #41237

References

Output from Acceptance Testing

% make testacc TESTS=TestAccEC2Fleet_SpotOptions PKG=ec2 ACCTEST_PARALLELISM=5
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.5 test ./internal/service/ec2/... -v -count 1 -parallel 5 -run='TestAccEC2Fleet_SpotOptions'  -timeout 360m -vet=off
2025/02/06 22:10:26 Initializing Terraform AWS Provider...
=== RUN   TestAccEC2Fleet_SpotOptions_allocationStrategy
=== PAUSE TestAccEC2Fleet_SpotOptions_allocationStrategy
=== RUN   TestAccEC2Fleet_SpotOptions_capacityRebalance
=== PAUSE TestAccEC2Fleet_SpotOptions_capacityRebalance
=== RUN   TestAccEC2Fleet_SpotOptions_MaxTotalPrice
=== PAUSE TestAccEC2Fleet_SpotOptions_MaxTotalPrice
=== RUN   TestAccEC2Fleet_SpotOptions_MinTargetCapacity
=== PAUSE TestAccEC2Fleet_SpotOptions_MinTargetCapacity
=== RUN   TestAccEC2Fleet_SpotOptions_SingleAvailabilityZone
=== PAUSE TestAccEC2Fleet_SpotOptions_SingleAvailabilityZone
=== RUN   TestAccEC2Fleet_SpotOptions_SingleInstanceType
=== PAUSE TestAccEC2Fleet_SpotOptions_SingleInstanceType
=== RUN   TestAccEC2Fleet_SpotOptions_instanceInterruptionBehavior
=== PAUSE TestAccEC2Fleet_SpotOptions_instanceInterruptionBehavior
=== RUN   TestAccEC2Fleet_SpotOptions_instancePoolsToUseCount
=== PAUSE TestAccEC2Fleet_SpotOptions_instancePoolsToUseCount
=== CONT  TestAccEC2Fleet_SpotOptions_allocationStrategy
=== CONT  TestAccEC2Fleet_SpotOptions_SingleAvailabilityZone
=== CONT  TestAccEC2Fleet_SpotOptions_MaxTotalPrice
=== CONT  TestAccEC2Fleet_SpotOptions_instanceInterruptionBehavior
=== CONT  TestAccEC2Fleet_SpotOptions_MinTargetCapacity
--- PASS: TestAccEC2Fleet_SpotOptions_MinTargetCapacity (36.76s)
=== CONT  TestAccEC2Fleet_SpotOptions_capacityRebalance
--- PASS: TestAccEC2Fleet_SpotOptions_SingleAvailabilityZone (39.19s)
=== CONT  TestAccEC2Fleet_SpotOptions_instancePoolsToUseCount
--- PASS: TestAccEC2Fleet_SpotOptions_MaxTotalPrice (65.86s)
=== CONT  TestAccEC2Fleet_SpotOptions_SingleInstanceType
--- PASS: TestAccEC2Fleet_SpotOptions_capacityRebalance (57.97s)
--- PASS: TestAccEC2Fleet_SpotOptions_SingleInstanceType (37.10s)
--- PASS: TestAccEC2Fleet_SpotOptions_instanceInterruptionBehavior (110.43s)
--- PASS: TestAccEC2Fleet_SpotOptions_allocationStrategy (112.36s)
--- PASS: TestAccEC2Fleet_SpotOptions_instancePoolsToUseCount (94.86s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	150.016s

fix(aws_ec2_fleet): implement missing `spot_options` arguments
@ElioDiNino ElioDiNino requested a review from a team as a code owner February 6, 2025 21:47
Copy link

github-actions bot commented Feb 6, 2025

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added the service/ec2 Issues and PRs that pertain to the ec2 service. label Feb 6, 2025
@ElioDiNino ElioDiNino marked this pull request as draft February 6, 2025 21:48
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 6, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @ElioDiNino 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 6, 2025
@ElioDiNino ElioDiNino changed the title Fix missing arguments in spot_options block for aws_ec2_fleet resource [WIP] Fix missing arguments in spot_options block for aws_ec2_fleet resource Feb 6, 2025
@github-actions github-actions bot added the tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. label Feb 7, 2025
@ElioDiNino ElioDiNino changed the title [WIP] Fix missing arguments in spot_options block for aws_ec2_fleet resource Fix missing arguments in spot_options block for aws_ec2_fleet resource Feb 7, 2025
@ElioDiNino ElioDiNino marked this pull request as ready for review February 7, 2025 06:18
@ElioDiNino
Copy link
Author

PR is now ready for review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_ec2_fleet doesn't implement all spot_options referenced in the documentation
2 participants