Skip to content

Enhance Builder Selection with Multi-Builder Filtering and Validation聽#13537

Open

Description

@RamsaiPolisetti

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Please search the existing issues for relevant feature requests, and use the
reaction feature to add upvotes to pre-existing requests.

Description

Currently, when working with multi-cloud or multi-builder Packer templates, users rely mainly on the -only flag to select specific builders. There is no native mechanism to filter builders by tags, metadata, or capabilities.
This makes large or modular templates harder to manage, especially in CI/CD environments where dynamic builder selection is needed.

This feature request proposes Enhanced Builder Selection with Multi-Builder Filtering and Validation, enabling tagging, metadata-based filtering, and improved visibility of which builders will execute.

Use Case(s)

  • Large multi-cloud templates containing AWS, Azure, GCP, VMware, and Docker builders.
  • CI/CD pipelines needing conditional builder execution (e.g., build only prod images).
  • Modular templates where builder selection depends on architecture, region, or environment.
  • Avoiding accidental builds on unwanted builders.
  • Improving template maintainability and clarity by grouping related builders.

Potential configuration

builders = [
  {
    type = "amazon-ebs"
    tags = ["prod", "x86", "us-east"]
  },
  {
    type = "azure-arm"
    tags = ["dev", "x86"]
  },
  {
    type = "googlecompute"
    tags = ["prod", "arm64"]
  }
]

# CLI usage examples:
# Select builders with matching tags:
packer build -filter="tags=prod,x86"

# Filter by custom metadata:
packer build -filter="region=us-east"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions