Skip to content

Commit 2e55cd2

Browse files
feat: Add ID of reverse DNS entry as output (#15)
* 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>
1 parent 5dffd96 commit 2e55cd2

File tree

10 files changed

+29
-8
lines changed

10 files changed

+29
-8
lines changed

README.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# terraform-hcloud-rdns
22

3-
Terraform module to manage the Hetzner Cloud resource (hcloud_rdns).
3+
Terraform module to manage the following Hetzner Cloud resource:
4+
5+
* hcloud_rdns
46

57
## Graph
68

@@ -18,7 +20,8 @@ data "hcloud_server" "default" {
1820
}
1921
2022
module "hcloud_rdns" {
21-
source = "dhoppeIT/rdns/hcloud"
23+
source = "dhoppeIT/rdns/hcloud"
24+
version = "~> 0.1"
2225
2326
server_id = data.hcloud_server.default.id
2427
ip_address = data.hcloud_server.default.ipv4_address
@@ -29,10 +32,11 @@ module "hcloud_rdns" {
2932
**Create multiple reverse DNS entries:**
3033

3134
```hcl
32-
data "hcloud_servers" "default" {}
35+
3336
3437
module "hcloud_rdns" {
35-
source = "dhoppeIT/rdns/hcloud"
38+
source = "dhoppeIT/rdns/hcloud"
39+
version = "~> 0.1"
3640
3741
count = length(data.hcloud_servers.default.servers)
3842
@@ -81,6 +85,7 @@ No modules.
8185
| Name | Description |
8286
|------|-------------|
8387
| <a name="output_dns_ptr"></a> [dns\_ptr](#output\_dns\_ptr) | DNS pointer for the IP address |
88+
| <a name="output_id"></a> [id](#output\_id) | Unique ID of the Reverse DNS entry |
8489
| <a name="output_ip_address"></a> [ip\_address](#output\_ip\_address) | IP address |
8590

8691
<!--- END_TF_DOCS --->

examples/multiple_entries/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ $ terraform apply
5656
| Name | Description |
5757
|------|-------------|
5858
| <a name="output_rdns_dns_ptr"></a> [rdns\_dns\_ptr](#output\_rdns\_dns\_ptr) | DNS pointer for the IP address |
59+
| <a name="output_rdns_id"></a> [rdns\_id](#output\_rdns\_id) | Unique ID of the Reverse DNS entry |
5960
| <a name="output_rdns_ip_address"></a> [rdns\_ip\_address](#output\_rdns\_ip\_address) | IP address |
6061

6162
<!--- END_TF_DOCS --->

examples/multiple_entries/outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
output "rdns_id" {
2+
description = "Unique ID of the Reverse DNS entry"
3+
value = module.hcloud_rdns.id
4+
}
5+
16
output "rdns_dns_ptr" {
27
description = "DNS pointer for the IP address"
38
value = module.hcloud_rdns.*.dns_ptr

examples/multiple_entries/rover.svg

+1-1
Loading

examples/single_entry/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ $ terraform apply
5656
| Name | Description |
5757
|------|-------------|
5858
| <a name="output_rdns_dns_ptr"></a> [rdns\_dns\_ptr](#output\_rdns\_dns\_ptr) | DNS pointer for the IP address |
59+
| <a name="output_rdns_id"></a> [rdns\_id](#output\_rdns\_id) | Unique ID of the Reverse DNS entry |
5960
| <a name="output_rdns_ip_address"></a> [rdns\_ip\_address](#output\_rdns\_ip\_address) | IP address |
6061

6162
<!--- END_TF_DOCS --->

examples/single_entry/outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
output "rdns_id" {
2+
description = "Unique ID of the Reverse DNS entry"
3+
value = module.hcloud_rdns.id
4+
}
5+
16
output "rdns_dns_ptr" {
27
description = "DNS pointer for the IP address"
38
value = module.hcloud_rdns.dns_ptr

examples/single_entry/rover.svg

+1-1
Loading

locals.tf

-1
This file was deleted.

outputs.tf

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
output "id" {
2+
description = "Unique ID of the Reverse DNS entry"
3+
value = hcloud_rdns.default.id
4+
}
5+
16
output "dns_ptr" {
27
description = "DNS pointer for the IP address"
38
value = hcloud_rdns.default.dns_ptr

rover.svg

+1-1
Loading

0 commit comments

Comments
 (0)