From f51b7c5d53d7f64b7b704fd3ac7ad94ce878e505 Mon Sep 17 00:00:00 2001 From: Anurag <81210977+kranurag7@users.noreply.github.com> Date: Sun, 29 Oct 2023 20:26:21 +0530 Subject: [PATCH] update server and temp_ssh labels this commit updates ServerLabels and TempSSHKeyLabels in hcl2spec. Signed-off-by: Anurag <81210977+kranurag7@users.noreply.github.com> --- builder/hcloud/config.hcl2spec.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/hcloud/config.hcl2spec.go b/builder/hcloud/config.hcl2spec.go index 3c2f4d9d..38ff213a 100644 --- a/builder/hcloud/config.hcl2spec.go +++ b/builder/hcloud/config.hcl2spec.go @@ -73,6 +73,7 @@ type FlatConfig struct { ServerName *string `mapstructure:"server_name" cty:"server_name" hcl:"server_name"` Location *string `mapstructure:"location" cty:"location" hcl:"location"` ServerType *string `mapstructure:"server_type" cty:"server_type" hcl:"server_type"` + ServerLabels map[string]string `mapstructure:"server_labels" cty:"server_labels" hcl:"server_labels"` UpgradeServerType *string `mapstructure:"upgrade_server_type" cty:"upgrade_server_type" hcl:"upgrade_server_type"` Image *string `mapstructure:"image" cty:"image" hcl:"image"` ImageFilter *FlatimageFilter `mapstructure:"image_filter" cty:"image_filter" hcl:"image_filter"` @@ -82,6 +83,7 @@ type FlatConfig struct { UserDataFile *string `mapstructure:"user_data_file" cty:"user_data_file" hcl:"user_data_file"` SSHKeys []string `mapstructure:"ssh_keys" cty:"ssh_keys" hcl:"ssh_keys"` Networks []int64 `mapstructure:"networks" cty:"networks" hcl:"networks"` + TempSSHKeyLabels map[string]string `mapstructure:"temp_sshkey_labels" cty:"temp_sshkey_labels" hcl:"temp_sshkey_labels"` RescueMode *string `mapstructure:"rescue" cty:"rescue" hcl:"rescue"` } @@ -160,6 +162,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "server_name": &hcldec.AttrSpec{Name: "server_name", Type: cty.String, Required: false}, "location": &hcldec.AttrSpec{Name: "location", Type: cty.String, Required: false}, "server_type": &hcldec.AttrSpec{Name: "server_type", Type: cty.String, Required: false}, + "server_labels": &hcldec.AttrSpec{Name: "server_labels", Type: cty.Map(cty.String), Required: false}, "upgrade_server_type": &hcldec.AttrSpec{Name: "upgrade_server_type", Type: cty.String, Required: false}, "image": &hcldec.AttrSpec{Name: "image", Type: cty.String, Required: false}, "image_filter": &hcldec.BlockSpec{TypeName: "image_filter", Nested: hcldec.ObjectSpec((*FlatimageFilter)(nil).HCL2Spec())}, @@ -169,6 +172,7 @@ func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec { "user_data_file": &hcldec.AttrSpec{Name: "user_data_file", Type: cty.String, Required: false}, "ssh_keys": &hcldec.AttrSpec{Name: "ssh_keys", Type: cty.List(cty.String), Required: false}, "networks": &hcldec.AttrSpec{Name: "networks", Type: cty.List(cty.Number), Required: false}, + "temp_sshkey_labels": &hcldec.AttrSpec{Name: "temp_sshkey_labels", Type: cty.Map(cty.String), Required: false}, "rescue": &hcldec.AttrSpec{Name: "rescue", Type: cty.String, Required: false}, } return s