Skip to content

Commit ad0b27c

Browse files
authored
feat: Added dns ttl as variable (#54)
1 parent 6c41b40 commit ad0b27c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module "acm" {
8383
|------|-------------|------|---------|:--------:|
8484
| certificate\_transparency\_logging\_preference | Specifies whether certificate details should be added to a certificate transparency log | `bool` | `true` | no |
8585
| create\_certificate | Whether to create ACM certificate | `bool` | `true` | no |
86+
| dns\_ttl | The TTL of DNS recursive resolvers to cache information about this record. | `number` | `60` | no |
8687
| domain\_name | A domain name for which the certificate should be issued | `string` | `""` | no |
8788
| subject\_alternative\_names | A list of domains that should be SANs in the issued certificate | `list(string)` | `[]` | no |
8889
| tags | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ resource "aws_route53_record" "validation" {
3030
zone_id = var.zone_id
3131
name = element(local.validation_domains, count.index)["resource_record_name"]
3232
type = element(local.validation_domains, count.index)["resource_record_type"]
33-
ttl = 60
33+
ttl = var.dns_ttl
3434

3535
records = [
3636
element(local.validation_domains, count.index)["resource_record_value"]

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ variable "tags" {
5757
type = map(string)
5858
default = {}
5959
}
60+
61+
variable "dns_ttl" {
62+
description = "The TTL of DNS recursive resolvers to cache information about this record."
63+
type = number
64+
default = 60
65+
}

0 commit comments

Comments
 (0)