hashicorp / hashicorp/packer-plugin-amazon
EC2 Fast Launch cannot be disabled when using additional parameters
- Dominant language
- Go
- Stars
- 91
- Forks
- 141
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
#### Overview of the Issue
For the `amazon-ebs` plugin, setting `enable_fast_launch` to `false` for the `fast_launch` config does not disable fast launch if the `fast_launch` config contains other parameters.
The issue is most likely related to this line of code:
https://github.com/hashicorp/packer-plugin-amazon/blob/b5f95e6d24014a9e3111ef8e35558d34a4d34fac/builder/ebs/fast_launch_setup.go#L191
#### Reproduction Steps
Add the below config to `amazon-ebs` in Packer build:
```
source "amazon-ebs" "windows_server_2022" {
[...]
fast_launch {
enable_fast_launch = false
target_resource_count = 10
}
[...]
}
```
I do have `ami_regions` configured, but did not test if that affects the behavior.
```
region = "us-east-1"
ami_regions = ["us-west-2"]
```
Observe the below in log output:
```
amazon-ebs.windows_server_2022: Waiting for fast launch to become ready on AMI "TRUNCATED" in region us-east-1...
```
### Plugin and Packer version
Packer v1.12.0
packer-plugin-amazon_v1.3.7_x5.0_linux_amd64
### Simplified Packer Buildfile
See reproduction steps
### Operating system and Environment details
Ubuntu 22.04 (Jammy)
### Justification
I would like have the EC2 fast launch configuration conditional based on other variables, but this isn't currently possible if I was to also set other parameters like `target_resource_count`.
Contributor guide
Assessment
This issue has not been assessed yet.