provisioner/salt-masterless: ignore the CmdArgs field in hcl2 (#9290)

fix #9233
This commit is contained in:
Adrien Delorme 2020-05-26 16:46:31 +02:00 committed by GitHub
parent 3e7d0a5388
commit a2e9439ee6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -67,7 +67,7 @@ type Config struct {
SaltBinDir string `mapstructure:"salt_bin_dir"`
// Command line args passed onto salt-call
CmdArgs string ""
CmdArgs string `mapstructure-to-hcl2:",skip"`
// The Guest OS Type (unix or windows)
GuestOSType string `mapstructure:"guest_os_type"`

View File

@ -31,7 +31,6 @@ type FlatConfig struct {
LogLevel *string `mapstructure:"log_level" cty:"log_level"`
SaltCallArgs *string `mapstructure:"salt_call_args" cty:"salt_call_args"`
SaltBinDir *string `mapstructure:"salt_bin_dir" cty:"salt_bin_dir"`
CmdArgs *string `cty:"cmd_args"`
GuestOSType *string `mapstructure:"guest_os_type" cty:"guest_os_type"`
}
@ -69,7 +68,6 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
"log_level": &hcldec.AttrSpec{Name: "log_level", Type: cty.String, Required: false},
"salt_call_args": &hcldec.AttrSpec{Name: "salt_call_args", Type: cty.String, Required: false},
"salt_bin_dir": &hcldec.AttrSpec{Name: "salt_bin_dir", Type: cty.String, Required: false},
"cmd_args": &hcldec.AttrSpec{Name: "cmd_args", Type: cty.String, Required: false},
"guest_os_type": &hcldec.AttrSpec{Name: "guest_os_type", Type: cty.String, Required: false},
}
return s