Skip to content

Commit

Permalink
feat: Add ID of reverse DNS entry as output (#15)
Browse files Browse the repository at this point in the history
* feat: Add ID of reverse DNS entry 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 5dffd96 commit 2e55cd2
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 8 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# terraform-hcloud-rdns

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

* hcloud_rdns

## Graph

Expand All @@ -18,7 +20,8 @@ data "hcloud_server" "default" {
}
module "hcloud_rdns" {
source = "dhoppeIT/rdns/hcloud"
source = "dhoppeIT/rdns/hcloud"
version = "~> 0.1"
server_id = data.hcloud_server.default.id
ip_address = data.hcloud_server.default.ipv4_address
Expand All @@ -29,10 +32,11 @@ module "hcloud_rdns" {
**Create multiple reverse DNS entries:**

```hcl
data "hcloud_servers" "default" {}
module "hcloud_rdns" {
source = "dhoppeIT/rdns/hcloud"
source = "dhoppeIT/rdns/hcloud"
version = "~> 0.1"
count = length(data.hcloud_servers.default.servers)
Expand Down Expand Up @@ -81,6 +85,7 @@ No modules.
| Name | Description |
|------|-------------|
| <a name="output_dns_ptr"></a> [dns\_ptr](#output\_dns\_ptr) | DNS pointer for the IP address |
| <a name="output_id"></a> [id](#output\_id) | Unique ID of the Reverse DNS entry |
| <a name="output_ip_address"></a> [ip\_address](#output\_ip\_address) | IP address |

<!--- END_TF_DOCS --->
Expand Down
1 change: 1 addition & 0 deletions examples/multiple_entries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $ terraform apply
| Name | Description |
|------|-------------|
| <a name="output_rdns_dns_ptr"></a> [rdns\_dns\_ptr](#output\_rdns\_dns\_ptr) | DNS pointer for the IP address |
| <a name="output_rdns_id"></a> [rdns\_id](#output\_rdns\_id) | Unique ID of the Reverse DNS entry |
| <a name="output_rdns_ip_address"></a> [rdns\_ip\_address](#output\_rdns\_ip\_address) | IP address |

<!--- END_TF_DOCS --->
Expand Down
5 changes: 5 additions & 0 deletions examples/multiple_entries/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
output "rdns_id" {
description = "Unique ID of the Reverse DNS entry"
value = module.hcloud_rdns.id
}

output "rdns_dns_ptr" {
description = "DNS pointer for the IP address"
value = module.hcloud_rdns.*.dns_ptr
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_entries/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/single_entry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $ terraform apply
| Name | Description |
|------|-------------|
| <a name="output_rdns_dns_ptr"></a> [rdns\_dns\_ptr](#output\_rdns\_dns\_ptr) | DNS pointer for the IP address |
| <a name="output_rdns_id"></a> [rdns\_id](#output\_rdns\_id) | Unique ID of the Reverse DNS entry |
| <a name="output_rdns_ip_address"></a> [rdns\_ip\_address](#output\_rdns\_ip\_address) | IP address |

<!--- END_TF_DOCS --->
Expand Down
5 changes: 5 additions & 0 deletions examples/single_entry/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
output "rdns_id" {
description = "Unique ID of the Reverse DNS entry"
value = module.hcloud_rdns.id
}

output "rdns_dns_ptr" {
description = "DNS pointer for the IP address"
value = module.hcloud_rdns.dns_ptr
Expand Down
2 changes: 1 addition & 1 deletion examples/single_entry/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 = "Unique ID of the Reverse DNS entry"
value = hcloud_rdns.default.id
}

output "dns_ptr" {
description = "DNS pointer for the IP address"
value = hcloud_rdns.default.dns_ptr
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 2e55cd2

Please sign in to comment.