use port as ints
This commit is contained in:
@@ -18,7 +18,7 @@ import (
|
||||
// userDataTemplateData represents variables for user_data interpolation
|
||||
type userDataTemplateData struct {
|
||||
HTTPIP string
|
||||
HTTPPort uint
|
||||
HTTPPort int
|
||||
}
|
||||
|
||||
// stepCreateInstance represents a Packer build step that creates CloudStack instances.
|
||||
@@ -86,7 +86,7 @@ func (s *stepCreateInstance) Run(_ context.Context, state multistep.StateBag) mu
|
||||
}
|
||||
|
||||
if config.UserData != "" {
|
||||
httpPort := state.Get("http_port").(uint)
|
||||
httpPort := state.Get("http_port").(int)
|
||||
httpIP, err := hostIP()
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Failed to determine host IP: %s", err)
|
||||
|
||||
Reference in New Issue
Block a user