Merge pull request #9734 from hashicorp/googlecompute-export-hcl-iap-fix

post-processor/googlecompute-export: Remove IAP configuration from HCL schema
This commit is contained in:
Megan Marsh 2020-08-07 11:07:11 -07:00 committed by GitHub
commit 15a008a408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -23,7 +23,7 @@ type Config struct {
common.PackerConfig `mapstructure:",squash"` common.PackerConfig `mapstructure:",squash"`
AccountFile string `mapstructure:"account_file"` AccountFile string `mapstructure:"account_file"`
IAP bool `mapstructure:"iap"` IAP bool `mapstructure-to-hcl2:",skip"`
DiskSizeGb int64 `mapstructure:"disk_size"` DiskSizeGb int64 `mapstructure:"disk_size"`
DiskType string `mapstructure:"disk_type"` DiskType string `mapstructure:"disk_type"`
@ -34,9 +34,8 @@ type Config struct {
VaultGCPOauthEngine string `mapstructure:"vault_gcp_oauth_engine"` VaultGCPOauthEngine string `mapstructure:"vault_gcp_oauth_engine"`
Zone string `mapstructure:"zone"` Zone string `mapstructure:"zone"`
ServiceAccountEmail string `mapstructure:"service_account_email"` ServiceAccountEmail string `mapstructure:"service_account_email"`
account *jwt.Config
account *jwt.Config ctx interpolate.Context
ctx interpolate.Context
} }
type PostProcessor struct { type PostProcessor struct {

View File

@ -17,7 +17,6 @@ type FlatConfig struct {
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"` 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"` PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"`
AccountFile *string `mapstructure:"account_file" cty:"account_file" hcl:"account_file"` AccountFile *string `mapstructure:"account_file" cty:"account_file" hcl:"account_file"`
IAP *bool `mapstructure:"iap" cty:"iap" hcl:"iap"`
DiskSizeGb *int64 `mapstructure:"disk_size" cty:"disk_size" hcl:"disk_size"` DiskSizeGb *int64 `mapstructure:"disk_size" cty:"disk_size" hcl:"disk_size"`
DiskType *string `mapstructure:"disk_type" cty:"disk_type" hcl:"disk_type"` DiskType *string `mapstructure:"disk_type" cty:"disk_type" hcl:"disk_type"`
MachineType *string `mapstructure:"machine_type" cty:"machine_type" hcl:"machine_type"` MachineType *string `mapstructure:"machine_type" cty:"machine_type" hcl:"machine_type"`
@ -49,7 +48,6 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
"packer_user_variables": &hcldec.AttrSpec{Name: "packer_user_variables", Type: cty.Map(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}, "packer_sensitive_variables": &hcldec.AttrSpec{Name: "packer_sensitive_variables", Type: cty.List(cty.String), Required: false},
"account_file": &hcldec.AttrSpec{Name: "account_file", Type: cty.String, Required: false}, "account_file": &hcldec.AttrSpec{Name: "account_file", Type: cty.String, Required: false},
"iap": &hcldec.AttrSpec{Name: "iap", Type: cty.Bool, Required: false},
"disk_size": &hcldec.AttrSpec{Name: "disk_size", Type: cty.Number, Required: false}, "disk_size": &hcldec.AttrSpec{Name: "disk_size", Type: cty.Number, Required: false},
"disk_type": &hcldec.AttrSpec{Name: "disk_type", Type: cty.String, Required: false}, "disk_type": &hcldec.AttrSpec{Name: "disk_type", Type: cty.String, Required: false},
"machine_type": &hcldec.AttrSpec{Name: "machine_type", Type: cty.String, Required: false}, "machine_type": &hcldec.AttrSpec{Name: "machine_type", Type: cty.String, Required: false},