hashicorp / hashicorp/packer

Ability to access plugin version in HCL

Open
#11,533 2 comments 0 reactions 0 assignees View on GitHub
enhancement plugin-block
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Description

I use [packer.version](https://www.packer.io/docs/templates/hcl_templates/contextual-variables#packer-version) to add a description to my build including build time, packer version etc. Now that packer plugins are going to be abstracted, the plugin version is also important.

What I'm not sure of is should it be a contextual var depending on builder (`plugin.version`), or explicit var (`vmware_plugin.version`)

I pin the exact versions of the plugins, so maybe I could access this var as a workaround for now, if thats possible?

#### Use Case(s)

Aiding build reproducibility.

#### Potential configuration

```
vmx_data = {
annotation = "${var.description}|0A|0ABuilt with Packer ${packer.version} and vmware plugin ${vmware_plugin.version} on ${timestamp()}"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.