Skip to content

Commit

Permalink
Use target name instead of a name attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
arnarg committed Mar 7, 2021
1 parent ed2864e commit eb6e114
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions doc/providers/hcloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ target "<address>" "hcloud" {
# The API token to use. (Required)
token = "9vx8w..."
# The name of the server to launch. Will be
# suffixed by a random string. (Required)
name = "lazyssh-ubuntu"
# The image to launch. (Required)
image = "ubuntu-20.03"
Expand Down
3 changes: 1 addition & 2 deletions providers/hcloud/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type state struct {

type hclTarget struct {
Token string `hcl:"token,attr"`
Name string `hcl:"name,attr"`
Image string `hcl:"image,attr"`
ServerType string `hcl:"server_type,attr"`
SSHKey string `hcl:"ssh_key,attr"`
Expand Down Expand Up @@ -73,7 +72,7 @@ func (factory *Factory) NewProvider(target string, hclBlock hcl.Body) (providers

prov := &Provider{
HCloud: client,
Name: parsed.Name,
Name: target,
Image: parsed.Image,
ServerType: parsed.ServerType,
SSHKey: parsed.SSHKey,
Expand Down

0 comments on commit eb6e114

Please sign in to comment.