File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -391,15 +391,18 @@ func (d *Driver) Create() error {
391391
392392 // Create a linode
393393 createOpts := linodego.InstanceCreateOptions {
394- Region : d .Region ,
395- Type : d .InstanceType ,
396- Label : d .InstanceLabel ,
397- RootPass : d .RootPassword ,
398- AuthorizedUsers : strings .Split (d .AuthorizedUsers , "," ),
399- AuthorizedKeys : []string {strings .TrimSpace (publicKey )},
400- Image : d .InstanceImage ,
401- SwapSize : & d .SwapSize ,
402- PrivateIP : d .CreatePrivateIP ,
394+ Region : d .Region ,
395+ Type : d .InstanceType ,
396+ Label : d .InstanceLabel ,
397+ RootPass : d .RootPassword ,
398+ AuthorizedKeys : []string {strings .TrimSpace (publicKey )},
399+ Image : d .InstanceImage ,
400+ SwapSize : & d .SwapSize ,
401+ PrivateIP : d .CreatePrivateIP ,
402+ }
403+
404+ if len (d .AuthorizedUsers ) > 0 {
405+ createOpts .AuthorizedUsers = strings .Split (d .AuthorizedUsers , "," )
403406 }
404407
405408 if d .Tags != "" {
You can’t perform that action at this time.
0 commit comments