How do I get this provisioner to work in HCL?
{
"type": "chef-solo",
"cookbook_paths": [
"cookbooks"
],
"json": {
"ssh-hardening":{
"ssh":{
"server":{
"allow_tcp_forwarding": true
}
}
}
},
"run_list": [
"os-hardening",
"ssh-hardening"
]
}
I thought that it should be this:
provisioner "chef-solo" {
cookbook_paths = [
"cookbooks"
]
run_list = [
"os-hardening",
"ssh-hardening"
]
json = {
ssh-hardening = {
ssh = {
server = {
allow_tcp_forwarding = true
}
}
}
}
}
but when I run packer validate
I get an error:
Inappropriate value for attribute "json": element "ssh-hardening": string
required.