Skip to content

EC2 Fast Launch cannot be disabled when using additional parameters #570

@ShawnHardwick

Description

@ShawnHardwick

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions