Skip to content

Commit

Permalink
new ssh key name variable
Browse files Browse the repository at this point in the history
  • Loading branch information
insekticid committed Apr 15, 2018
1 parent 64836c6 commit 2f91ccd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#copy this file to .env file
TF_VAR_hcloud_token=xxx
TF_VAR_docker_version="17.03"
TF_VAR_ssh_key_name="[email protected]"
TF_VAR_ssh_public_key="~/.ssh/id_ed25519.pub"
TF_VAR_ssh_private_key="~/.ssh/id_ed25519"
TF_VAR_rancher_password="admin"
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ provider "hcloud" {
}

resource "hcloud_ssh_key" "admin" {
name = "admin"
name = "${var.ssh_key_name}"
public_key = "${file(var.ssh_public_key)}"
}

Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
variable "hcloud_token" {}

variable "ssh_key_name" {
default = "[email protected]"
}

variable "ssh_private_key" {
description = "Private Key to access the machines"
default = "~/.ssh/id_ed25519"
Expand Down

0 comments on commit 2f91ccd

Please sign in to comment.