Skip to content

Commit

Permalink
update labels
Browse files Browse the repository at this point in the history
  • Loading branch information
janiskemper committed Nov 2, 2023
1 parent 67dc18a commit 8e3d6a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions builder/hcloud/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ type Config struct {
UserData string `mapstructure:"user_data"`
UserDataFile string `mapstructure:"user_data_file"`
SSHKeys []string `mapstructure:"ssh_keys"`
SSHKeyLabels map[string]string `mapstructure:"sshkey_labels"`
Networks []int64 `mapstructure:"networks"`

TempSSHKeyLabels map[string]string `mapstructure:"temp_sshkey_labels"`

RescueMode string `mapstructure:"rescue"`

ctx interpolate.Context
Expand Down
4 changes: 4 additions & 0 deletions builder/hcloud/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion builder/hcloud/step_create_sshkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *stepCreateSSHKey) Run(ctx context.Context, state multistep.StateBag) mu
key, _, err := client.SSHKey.Create(ctx, hcloud.SSHKeyCreateOpts{
Name: name,
PublicKey: string(c.Comm.SSHPublicKey),
Labels: c.TempSSHKeyLabels,
Labels: c.SSHKeyLabels,
})
if err != nil {
err := fmt.Errorf("Error creating temporary SSH key: %s", err)
Expand Down

0 comments on commit 8e3d6a6

Please sign in to comment.