hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
14.99k stars 3.33k forks source link

starlark support #8168

Closed vtolstov closed 4 years ago

vtolstov commented 4 years ago

Feature Description

Provide support for starlark based template files

Use Case(s)

Don't wait hcl/hcl2 and use already useful configuration language

SwampDragons commented 4 years ago

Hi, thanks for the suggestion. @azr is actively working on HCL2 at this point and I'm not interested in splitting our energy to work on a different configuration language at the same time. I know it's been a long and frustrating wait for people, but I promise it's almost over.

Since we're not interested in implementing this I'm going to close but I do appreciate the suggestion.

vtolstov commented 4 years ago

Does it possible to handle input via plugin? Builders, provisioners and post-processors already can be plugins. Why not be able to handle via plugin input?

SwampDragons commented 4 years ago

This is a cool idea, and off the top of my head I can't think of any reasons not to, but it is not something we're not actively working on at this time. I know people have written wrappers for Packer that convert a yaml config into the json template that Packer can read, and this seems like less work than rearchitecting Packer's core to accept multiple kinds of plugins.

vtolstov commented 4 years ago

i'm open for discuss =). I have two variants - handle input via plugins, or create packer convert command that use input file in yaml/starlark or something else and create json(and later hcl) template. So when someone have problems we already have full official packer template file to investigation. What you think?

vtolstov commented 4 years ago

variant with command more simple i think so we need unmarshal []byte slice to target packer struct.

SwampDragons commented 4 years ago

I just don't think this is something that I want to have to maintain as part of the Packer core.

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.