pp.google.[import|export]: unexport Account field
so it doesnt temper with hcl2 cfg generation
This commit is contained in:
parent
af08e2a410
commit
771a6e55ef
|
@ -28,7 +28,7 @@ type Config struct {
|
|||
VaultGCPOauthEngine string `mapstructure:"vault_gcp_oauth_engine"`
|
||||
Zone string `mapstructure:"zone"`
|
||||
|
||||
Account *jwt.Config
|
||||
account *jwt.Config
|
||||
ctx interpolate.Context
|
||||
}
|
||||
|
||||
|
@ -108,14 +108,14 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact
|
|||
if err != nil {
|
||||
return nil, false, false, err
|
||||
}
|
||||
p.config.Account = cfg
|
||||
p.config.account = cfg
|
||||
}
|
||||
if p.config.AccountFile != "" {
|
||||
cfg, err := googlecompute.ProcessAccountFile(p.config.AccountFile)
|
||||
if err != nil {
|
||||
return nil, false, false, err
|
||||
}
|
||||
p.config.Account = cfg
|
||||
p.config.account = cfg
|
||||
}
|
||||
|
||||
// Set up exporter instance configuration.
|
||||
|
@ -150,7 +150,7 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact
|
|||
exporterConfig.CalcTimeout()
|
||||
|
||||
driver, err := googlecompute.NewDriverGCE(ui, builderProjectId,
|
||||
p.config.Account, p.config.VaultGCPOauthEngine)
|
||||
p.config.account, p.config.VaultGCPOauthEngine)
|
||||
if err != nil {
|
||||
return nil, false, false, err
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ type Config struct {
|
|||
SkipClean bool `mapstructure:"skip_clean"`
|
||||
VaultGCPOauthEngine string `mapstructure:"vault_gcp_oauth_engine"`
|
||||
|
||||
Account *jwt.Config
|
||||
account *jwt.Config
|
||||
ctx interpolate.Context
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
|
|||
if err != nil {
|
||||
errs = packer.MultiErrorAppend(errs, err)
|
||||
}
|
||||
p.config.Account = cfg
|
||||
p.config.account = cfg
|
||||
}
|
||||
|
||||
if p.config.AccountFile != "" && p.config.VaultGCPOauthEngine != "" {
|
||||
|
@ -105,7 +105,7 @@ func (p *PostProcessor) Configure(raws ...interface{}) error {
|
|||
}
|
||||
|
||||
func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, bool, error) {
|
||||
client, err := googlecompute.NewClientGCE(p.config.Account, p.config.VaultGCPOauthEngine)
|
||||
client, err := googlecompute.NewClientGCE(p.config.account, p.config.VaultGCPOauthEngine)
|
||||
if err != nil {
|
||||
return nil, false, false, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue