Skip to content

Commit

Permalink
feat: Add ID of SSH public key as output (#16)
Browse files Browse the repository at this point in the history
* feat: Add ID of SSH public key as output

* docs: Add missing version argument to module block

* chore: Remove empty file (locals.tf)

* docs: Generate README.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
dhoppe and github-actions[bot] authored Feb 8, 2022
1 parent 2bbdc6d commit adadcff
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 7 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# terraform-hcloud-ssh_key

Terraform module to manage the Hetzner Cloud resource (hcloud_ssh_key).
Terraform module to manage the following Hetzner Cloud resource:

* hcloud_ssh_key

## Graph

Expand All @@ -14,7 +16,8 @@ Copy and paste into your Terraform configuration, insert the variables and run `

```hcl
module "hcloud_ssh_key" {
source = "dhoppeIT/ssh_key/hcloud"
source = "dhoppeIT/ssh_key/hcloud"
version = "~> 0.2"
name = "terraform"
public_key = "~/.ssh/id_terraform.pub"
Expand All @@ -25,7 +28,8 @@ module "hcloud_ssh_key" {

```hcl
module "hcloud_ssh_key" {
source = "dhoppeIT/ssh_key/hcloud"
source = "dhoppeIT/ssh_key/hcloud"
version = "~> 0.2"
name = "terraform"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC3euXiX6jFStmjcDzW4dHZSdSUuip3cGu62Fhh0+zdILdzvyoMwqeuuuWova+ltZfeAgZOd6n0QKOhs2eTj6eEfTyIpmmCQgosu1GyQKQ8oHcBqDV+atrc2MQRhZPIZgVXn4CL8IldlEjYoGI6zreBY1uEhUoGC79bt9Eqtmxr1M8xQmJ1ZVI8kzDLax31vckuWnO3PlaUyT5VPBC/XPLdZ3PodX7J2CQ0MwlHzG1qFxrp1XonYpV1Rbfb9Vj4Wu27Md7RETSOZq7wlsgEC7MBTb6guFuz4tL5CfiHO3YhZEmtWi5UL7YMuP4pD+mGU3nKcQOsOYNpuzV5p7NZANv+i40BtSJiQCWbzrPAOvj8Pn5lk/7aE3uVRHAWpIwGJ3HAof9VS5EoM2oq6dwAM8bK/XBz77pOdyHv+89o3Rc/WzhBs5wSMHUd54SQZ4STEERmi/GWUcfYi30s01W2SmH3H02NI8iPfNvDma858CfwDELNJnE7rphG1INQSZArSzpTZpoHFPZ0pIvG7mFMKeYmjizV8W9TwS+IpuLR6Cm3plUIhQhAzbyeVVKAU+66DtywIKdJm20Y94joVQD3KOGlxUrqKwyTZAOkknR7/yKiQfgritlRKVdLHyW/znBKCHskwqp9WgXBP6q4YvfM3muWK+guj+wi+9CtjNUYT+tkRQ== Terraform"
Expand Down Expand Up @@ -69,6 +73,7 @@ No modules.
| Name | Description |
|------|-------------|
| <a name="output_fingerprint"></a> [fingerprint](#output\_fingerprint) | The fingerprint of the SSH key |
| <a name="output_id"></a> [id](#output\_id) | The unique ID of the key |
| <a name="output_name"></a> [name](#output\_name) | The name of the SSH key |
| <a name="output_public_key"></a> [public\_key](#output\_public\_key) | The text of the public key |

Expand Down
1 change: 1 addition & 0 deletions examples/file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ No resources.
| Name | Description |
|------|-------------|
| <a name="output_ssh_key_fingerprint"></a> [ssh\_key\_fingerprint](#output\_ssh\_key\_fingerprint) | The fingerprint of the SSH key |
| <a name="output_ssh_key_id"></a> [ssh\_key\_id](#output\_ssh\_key\_id) | The unique ID of the key |
| <a name="output_ssh_key_name"></a> [ssh\_key\_name](#output\_ssh\_key\_name) | The name of the SSH key |
| <a name="output_ssh_key_public_key"></a> [ssh\_key\_public\_key](#output\_ssh\_key\_public\_key) | The text of the public key |

Expand Down
5 changes: 5 additions & 0 deletions examples/file/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
output "ssh_key_id" {
description = "The unique ID of the key"
value = module.hcloud_ssh_key.id
}

output "ssh_key_name" {
description = "The name of the SSH key"
value = module.hcloud_ssh_key.name
Expand Down
2 changes: 1 addition & 1 deletion examples/file/rover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ No resources.
| Name | Description |
|------|-------------|
| <a name="output_ssh_key_fingerprint"></a> [ssh\_key\_fingerprint](#output\_ssh\_key\_fingerprint) | The fingerprint of the SSH key |
| <a name="output_ssh_key_id"></a> [ssh\_key\_id](#output\_ssh\_key\_id) | The unique ID of the key |
| <a name="output_ssh_key_name"></a> [ssh\_key\_name](#output\_ssh\_key\_name) | The name of the SSH key |
| <a name="output_ssh_key_public_key"></a> [ssh\_key\_public\_key](#output\_ssh\_key\_public\_key) | The text of the public key |

Expand Down
5 changes: 5 additions & 0 deletions examples/text/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
output "ssh_key_id" {
description = "The unique ID of the key"
value = module.hcloud_ssh_key.id
}

output "ssh_key_name" {
description = "The name of the SSH key"
value = module.hcloud_ssh_key.name
Expand Down
2 changes: 1 addition & 1 deletion examples/text/rover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion locals.tf

This file was deleted.

5 changes: 5 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
output "id" {
description = "The unique ID of the key"
value = hcloud_ssh_key.default.id
}

output "name" {
description = "The name of the SSH key"
value = hcloud_ssh_key.default.name
Expand Down
2 changes: 1 addition & 1 deletion rover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit adadcff

Please sign in to comment.