While this looks like it would work for chef-solo, if I use it for chef-client, I get: Unsupported argument; An argument named "json_string" is not expected here.
On Saturday, April 3, 2021 at 9:14:08 AM UTC-5 Sylvia Moss wrote: > > For HCL2 templates you must use the json_string > <https://www.packer.io/docs/provisioners/chef-solo#node-attribute-mapping> > option. It will be like: > json_string = jsonencode({ > "test_a" = { > "product_1" = {"version" = "1.00.00"} > "product_2" = {"version" ="1.01.00"} > } > }) > > > A sábado, 3 de abril de 2021 à(s) 15:41:29 UTC+2, [email protected] > escreveu: > >> For the chef-client Provisioner , I currently use something like this >> for the json option: >> >> "json": { >> "test_a": { >> "product_1": >> {"version": "1.00.00"}, >> >> "product_2": >> {"version": "1.01.00} >> } >> } >> >> Everything that try when switching to HCL2 doesn't work. >> >> Any help would be appreciated. >> thanks >> > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/hashicorp/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/22c323a5-a36f-456b-9b50-87173e1d8195n%40googlegroups.com.
