|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package scaleway
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"crypto/rand"
|
|
|
|
|
"crypto/rsa"
|
|
|
|
|
"crypto/x509"
|
|
|
|
|
@ -12,8 +13,8 @@ import (
|
|
|
|
|
"runtime"
|
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
"github.com/hashicorp/packer/helper/multistep"
|
|
|
|
|
"github.com/hashicorp/packer/packer"
|
|
|
|
|
"github.com/mitchellh/multistep"
|
|
|
|
|
"golang.org/x/crypto/ssh"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
@ -23,7 +24,7 @@ type stepCreateSSHKey struct {
|
|
|
|
|
PrivateKeyFile string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (s *stepCreateSSHKey) Run(state multistep.StateBag) multistep.StepAction {
|
|
|
|
|
func (s *stepCreateSSHKey) Run(_ context.Context, state multistep.StateBag) multistep.StepAction {
|
|
|
|
|
ui := state.Get("ui").(packer.Ui)
|
|
|
|
|
|
|
|
|
|
if s.PrivateKeyFile != "" {
|
|
|
|
|
|