YaleUniversity / packer-plugin-goss

Goss Provisioner for Packer
MIT License
136 stars 45 forks source link

Update to packer-plugin-sdk v0.0.11 and regenerate HCL config #43

Closed frightenedmonkey closed 3 years ago

frightenedmonkey commented 3 years ago

The packer 1.7 release changed the protocol version to 5 (also, notably, the plugin SDK didn't correctly format the protocol information as expected until v0.0.11). Running the packer-sdk-migrator tool mostly worked, but left a couple of issues with fields in the config marked as unused. It appears that the changes to HCL—and how mapstructure decodes things—requires that you annotate basic fields with mapstructure struct tags when the fields don't follow the default mapping.

This change resolves https://github.com/YaleUniversity/packer-provisioner-goss/issues/42

fishnix commented 3 years ago

Hi @frightenedmonkey thanks for this PR! Will this break backwards compatibility with older versions of packer? Also, I've recently merged and released Windows support which will require you to rebase and regenerate your hcl spec. Thanks!

frightenedmonkey commented 3 years ago

@fishnix I'll rebase.

With regard to backwards compatibility, unfortunately, Hashicorp broke it with the update. If you review their guide on upgrading to 1.7 templates, you can see the table I've screenshot below:

Screen Shot 2021-02-25 at 8 19 09 AM

I don't have a solution for that, unfortunately.

fishnix commented 3 years ago

Ok thanks, we can probably release this as a major version upgrade then. Does that seem reasonable?

frightenedmonkey commented 3 years ago

SGTM; I appreciate you being receptive!

frightenedmonkey commented 3 years ago

@fishnix rebased & tests are passing locally for me (nice to get some :-D)