Skip to content

Commit

Permalink
feature: add record_type variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmacedot authored Nov 4, 2024
1 parent c014550 commit 0d9904a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,10 @@ variable "web_acl_id" {
type = string
description = "Web ACL ARN for Cloudfront distribution"
default = null
}

variable "record_type" {
type = string
description = "Type of the record to create on Route53"
default = "CNAME"
}
2 changes: 1 addition & 1 deletion route53-record.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_route53_record" "hostname" {

zone_id = data.aws_route53_zone.selected.zone_id
name = var.hostnames[count.index]
type = "CNAME"
type = var.record_type
ttl = "300"
records = [element(aws_cloudfront_distribution.default.*.domain_name, 0)]
}

0 comments on commit 0d9904a

Please sign in to comment.