Skip to content

Conversation

@harrison-ahearn
Copy link

Summary

  • Adds capacity_reservation_market_type configuration option to all AWS Packer builders
  • Enables support for interruptible capacity reservations and capacity blocks
  • Includes validation to ensure market type is only used with specific capacity reservation IDs or group ARNs

Changes

  • Added CapacityReservationMarketType field to RunConfig with validation
  • Updated StepRunSourceInstance to apply the market type via InstanceMarketOptions
  • Updated all builder types (ebs, ebssurrogate, ebsvolume, instance) to pass through the new field
  • Regenerated HCL2 spec files for all builders
  • Updated documentation with the new configuration option

Test plan

  • Verify configuration validation works correctly
  • Test with interruptible capacity reservations
  • Test with capacity blocks
  • Ensure backwards compatibility (empty value defaults to standard on-demand)

🤖 Generated with Claude Code

Add support for specifying market type when using EC2 capacity reservations.
This enables users to leverage interruptible capacity reservations and capacity
blocks by setting the capacity_reservation_market_type field.

Changes include:
- Add CapacityReservationMarketType field to RunConfig
- Add validation for market type values (interruptible-capacity-reservation, capacity-block)
- Update StepRunSourceInstance to apply market type to instance launch options
- Update all builder types (ebs, ebssurrogate, ebsvolume, instance) to pass through the new field
- Regenerate HCL2 spec files for all builders
- Update documentation with new configuration option

Co-Authored-By: Claude <[email protected]>
@harrison-ahearn harrison-ahearn requested a review from a team as a code owner January 21, 2026 19:15
@hashicorp-cla-app
Copy link

hashicorp-cla-app bot commented Jan 21, 2026

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant