diff options
Diffstat (limited to 'account')
| -rw-r--r-- | account/main.tf | 23 | ||||
| -rw-r--r-- | account/outputs.tf | 4 |
2 files changed, 27 insertions, 0 deletions
diff --git a/account/main.tf b/account/main.tf new file mode 100644 index 0000000..1966aed --- /dev/null +++ b/account/main.tf @@ -0,0 +1,23 @@ +terraform { + required_providers { + hcloud = { + source = "hetznercloud/hcloud" + version = "~> 1.68.0" + } + } +} + +provider "hcloud" { + token = var.hcloud_token +} + +variable "hcloud_token" { + type = string + sensitive = true +} + +resource "hcloud_ssh_key" "default" { + name = "default-key" + public_key = file("~/.ssh/id_rsa.pub") +} + diff --git a/account/outputs.tf b/account/outputs.tf new file mode 100644 index 0000000..f7eb536 --- /dev/null +++ b/account/outputs.tf @@ -0,0 +1,4 @@ +output "ssh_key_name" { + description = "Account ssh key" + value = hcloud_ssh_key.default.name +} |