HCL: re-add the option to set a command for inspec (#9800)
This commit is contained in:
parent
ada2a431ef
commit
f28c06a861
|
@ -41,8 +41,8 @@ type Config struct {
|
|||
common.PackerConfig `mapstructure:",squash"`
|
||||
ctx interpolate.Context
|
||||
|
||||
// The command to run inspec
|
||||
Command string `mapstructure-to-hcl2:",skip"`
|
||||
// The command to invoke InSpec. Defaults to `inspec`.
|
||||
Command string `mapstructure-to-hcl2:"command"`
|
||||
SubCommand string `mapstructure-to-hcl2:",skip"`
|
||||
|
||||
// Extra options to pass to the inspec command
|
||||
|
|
|
@ -16,6 +16,7 @@ type FlatConfig struct {
|
|||
PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"`
|
||||
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"`
|
||||
PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"`
|
||||
Command *string `mapstructure-to-hcl2:"command" cty:"command" hcl:"command"`
|
||||
ExtraArguments []string `mapstructure:"extra_arguments" cty:"extra_arguments" hcl:"extra_arguments"`
|
||||
InspecEnvVars []string `mapstructure:"inspec_env_vars" cty:"inspec_env_vars" hcl:"inspec_env_vars"`
|
||||
Profile *string `mapstructure:"profile" cty:"profile" hcl:"profile"`
|
||||
|
@ -48,6 +49,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
|
|||
"packer_on_error": &hcldec.AttrSpec{Name: "packer_on_error", Type: cty.String, Required: false},
|
||||
"packer_user_variables": &hcldec.AttrSpec{Name: "packer_user_variables", Type: cty.Map(cty.String), Required: false},
|
||||
"packer_sensitive_variables": &hcldec.AttrSpec{Name: "packer_sensitive_variables", Type: cty.List(cty.String), Required: false},
|
||||
"command": &hcldec.AttrSpec{Name: "command", Type: cty.String, Required: false},
|
||||
"extra_arguments": &hcldec.AttrSpec{Name: "extra_arguments", Type: cty.List(cty.String), Required: false},
|
||||
"inspec_env_vars": &hcldec.AttrSpec{Name: "inspec_env_vars", Type: cty.List(cty.String), Required: false},
|
||||
"profile": &hcldec.AttrSpec{Name: "profile", Type: cty.String, Required: false},
|
||||
|
|
Loading…
Reference in New Issue