The capacity reservation options (ID, ARN, or Preference) are all mutually exclusive, only one of the three should be set in a given configuration.
The code wasn't enforcing this, leading to cases in which conflicts could be specified in the configuration, and the call to start the instance would then fail during build instead of before it starts.
This commit adds some logic to ensure that only valid options are accepted, and some tests are added to make sure these options cannot conflict.
The capacity reservation options (ID, ARN, or Preference) are all mutually exclusive, only one of the three should be set in a given configuration.
The code wasn't enforcing this, leading to cases in which conflicts could be specified in the configuration, and the call to start the instance would then fail during build instead of before it starts.
This commit adds some logic to ensure that only valid options are accepted, and some tests are added to make sure these options cannot conflict.
Closes #473