diff --git a/builder/proxmox/builder.go b/builder/proxmox/builder.go index 2b12308e1..083cfeb3d 100644 --- a/builder/proxmox/builder.go +++ b/builder/proxmox/builder.go @@ -41,7 +41,7 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack tlsConfig := &tls.Config{ InsecureSkipVerify: b.config.SkipCertValidation, } - b.proxmoxClient, err = proxmox.NewClient(b.config.ProxmoxURL.String(), nil, tlsConfig) + b.proxmoxClient, err = proxmox.NewClient(b.config.proxmoxURL.String(), nil, tlsConfig) if err != nil { return nil, err } diff --git a/builder/proxmox/config.go b/builder/proxmox/config.go index 766d3e71d..5d0a9f1eb 100644 --- a/builder/proxmox/config.go +++ b/builder/proxmox/config.go @@ -27,7 +27,7 @@ type Config struct { Comm communicator.Config `mapstructure:",squash"` ProxmoxURLRaw string `mapstructure:"proxmox_url"` - ProxmoxURL *url.URL + proxmoxURL *url.URL SkipCertValidation bool `mapstructure:"insecure_skip_tls_verify"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` @@ -184,7 +184,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) { if c.ProxmoxURLRaw == "" { errs = packer.MultiErrorAppend(errs, errors.New("proxmox_url must be specified")) } - if c.ProxmoxURL, err = url.Parse(c.ProxmoxURLRaw); err != nil { + if c.proxmoxURL, err = url.Parse(c.ProxmoxURLRaw); err != nil { errs = packer.MultiErrorAppend(errs, errors.New(fmt.Sprintf("Could not parse proxmox_url: %s", err))) } if c.ISOFile == "" {