From d593ad3b38f296e21eff8431b0f139cd6963188e Mon Sep 17 00:00:00 2001 From: badra001 Date: Fri, 24 Mar 2023 17:06:17 -0400 Subject: [PATCH] add output for timestamp --- a/output.timestamp.tf | 1 + aaaa/output.timestamp.tf | 1 + cname/output.timestamp.tf | 1 + common/output.timestamp.tf | 4 ++++ host/output.timestamp.tf | 1 + ptr/README.md | 1 + ptr/output.tf | 5 ++++- ptr/output.timestamp.tf | 1 + 8 files changed, 14 insertions(+), 1 deletion(-) create mode 120000 a/output.timestamp.tf create mode 120000 aaaa/output.timestamp.tf create mode 120000 cname/output.timestamp.tf create mode 100644 common/output.timestamp.tf create mode 120000 host/output.timestamp.tf create mode 120000 ptr/output.timestamp.tf diff --git a/a/output.timestamp.tf b/a/output.timestamp.tf new file mode 120000 index 0000000..c4dc4d5 --- /dev/null +++ b/a/output.timestamp.tf @@ -0,0 +1 @@ +../common/output.timestamp.tf \ No newline at end of file diff --git a/aaaa/output.timestamp.tf b/aaaa/output.timestamp.tf new file mode 120000 index 0000000..c4dc4d5 --- /dev/null +++ b/aaaa/output.timestamp.tf @@ -0,0 +1 @@ +../common/output.timestamp.tf \ No newline at end of file diff --git a/cname/output.timestamp.tf b/cname/output.timestamp.tf new file mode 120000 index 0000000..c4dc4d5 --- /dev/null +++ b/cname/output.timestamp.tf @@ -0,0 +1 @@ +../common/output.timestamp.tf \ No newline at end of file diff --git a/common/output.timestamp.tf b/common/output.timestamp.tf new file mode 100644 index 0000000..c393251 --- /dev/null +++ b/common/output.timestamp.tf @@ -0,0 +1,4 @@ +output "timestamp" { + description = "Record creation Unix timestamp (from heritage records)" + value = time_static.timestamp.unix +} diff --git a/host/output.timestamp.tf b/host/output.timestamp.tf new file mode 120000 index 0000000..c4dc4d5 --- /dev/null +++ b/host/output.timestamp.tf @@ -0,0 +1 @@ +../common/output.timestamp.tf \ No newline at end of file diff --git a/ptr/README.md b/ptr/README.md index 3fe860b..60399d9 100644 --- a/ptr/README.md +++ b/ptr/README.md @@ -88,3 +88,4 @@ The record looks like: | [availability\_zone\_suffixes](#output\_availability\_zone\_suffixes) | VPC Availability zone suffix list | | [heritage\_name](#output\_heritage\_name) | DNS Name created for the heritage record, if enabled | | [name](#output\_name) | DNS Name created (same as what was provided) | +| [timestamp](#output\_timestamp) | Record creation Unix timestamp (from heritage records) | diff --git a/ptr/output.tf b/ptr/output.tf index 93df745..7f30cdf 100644 --- a/ptr/output.tf +++ b/ptr/output.tf @@ -5,5 +5,8 @@ output "name" { output "heritage_name" { description = "DNS Name created for the heritage record, if enabled" - value = try(aws_route53_record.entry_heritage[0].name, null) + value = concat( + [for r in aws_route53_record.entry_ipv4_ptr_heritage : r.name], + [for r in aws_route53_record.entry_ipv6_ptr_heritage : r.name], + ) } diff --git a/ptr/output.timestamp.tf b/ptr/output.timestamp.tf new file mode 120000 index 0000000..c4dc4d5 --- /dev/null +++ b/ptr/output.timestamp.tf @@ -0,0 +1 @@ +../common/output.timestamp.tf \ No newline at end of file