In packer its possible to have multiple build blocks but this is not supported by the linter and it errors, highlighting each build block. https://developer.hashicorp.com/packer/docs/templates/hcl_templates/blocks/build/source