hashicorp / hashicorp/packer-plugin-amazon

using spot_instance_types returns InvalidParameterValue: Invalid value '' for InstanceType.

Open
#198 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
91
Forks
141
Avg merge
2d 18h
Merged PRs (30d)
3

Description

_This issue was originally opened by @lmayorga1980 in https://github.com/hashicorp/packer/issues/11585 and has been migrated to this repository. The original issue description is below._

---

#### Overview of the Issue

I get an error trying to use `spot_instances_types` feature.

#### Reproduction Steps

Run a Packer Template with the following attributes.

```
...
"spot_instance_types": "t2.small,t2.medium",
"spot_price": "auto",
...
```

### Packer version

`1.7.9`

### Operating system and Environment details

CentOS 7.x

### Log Fragments and crash.log files

```
==> amazon-ebs: Error launching source instance: InvalidParameterValue: Invalid value '' for InstanceType.
==> amazon-ebs: status code: 400, request id: 0f47da10-0c42-4a40-9a86-0afd3560bee5
==> amazon-ebs: Pausing before cleanup of step 'StepCleanupVolumes'. Press enter to continue.
==> amazon-ebs: No volumes to clean up, skipping
==> amazon-ebs: Pausing before cleanup of step 'StepIamInstanceProfile'. Press enter to continue.
==> amazon-ebs: Pausing before cleanup of step 'StepSecurityGroup'. Press enter to continue.
==> amazon-ebs: Pausing before cleanup of step 'StepKeyPair'. Press enter to continue.
==> amazon-ebs: Deleting temporary keypair...
==> amazon-ebs: Pausing before cleanup of step 'StepNetworkInfo'. Press enter to continue.
==> amazon-ebs: Pausing before cleanup of step 'StepSourceAMIInfo'. Press enter to continue.
==> amazon-ebs: Pausing before cleanup of step 'StepPreValidate'. Press enter to continue.
Build 'amazon-ebs' errored after 16 seconds 413 milliseconds: Error launching source instance: InvalidParameterValue: Invalid value '' for InstanceType.
status code: 400, request id: 0f47da10-0c42-4a40-9a86-0afd3560bee5

==> Wait completed after 16 seconds 413 milliseconds

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs: Error launching source instance: InvalidParameterValue: Invalid value '' for InstanceType.
status code: 400, request id: 0f47da10-0c42-4a40-9a86-0afd3560bee5
```

I am not providing **Instance Type** value but the documentation mentions that both Instance Type and Spot Instance Types are exclusive.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.