Skip to content

Commit

Permalink
update variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Dugar committed Oct 11, 2019
1 parent 9a7cbad commit 1e3c35b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ resource "aws_route53_record" "default" {
# Module : Route53 Record Set
# Description : Terraform module to create Route53 record sets resource on AWS.
resource "aws_route53_record" "alias" {
count = var.record_enabled && length(var.alias["names"]) > 0 ? length(var.alias["names"]) : 0
zone_id = var.zone_id != "" ? var.zone_id : (var.private_enabled ? aws_route53_zone.private.*.zone_id[0] : aws_route53_zone.public.*.zone_id[0])
count = var.record_enabled && length(var.alias) > 0 && length(var.alias["names"]) > 0 ? length(var.alias["names"]) : 0
zone_id = var.zone_id
name = element(var.names, count.index)
type = element(var.types, count.index)
set_identifier = length(var.set_identifiers) > 0 ? element(var.set_identifiers, count.index) : ""
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ variable "health_check_ids" {

variable "alias" {
type = map
default = {}
default = {"names"=[],"zone_ids"=[],"evaluate_target_healths"=[]}
description = "An alias block. Conflicts with ttl & records. Alias record documented below."
}

Expand Down

0 comments on commit 1e3c35b

Please sign in to comment.