Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Revert "Merge pull request #20 from kchugalinskiy/master"
Browse files Browse the repository at this point in the history
This reverts commit 7626d0f, reversing
changes made to cc60714.
  • Loading branch information
brikis98 committed Nov 2, 2017
1 parent 7626d0f commit 9f7f835
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions modules/vault-elb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ terraform {
required_version = ">= 0.9.3"
}

# ---------------------------------------------------------------------------------------------------------------------
# EXTRACT SUBNET INFORMATION IF availability_zones parameter not specified
# ---------------------------------------------------------------------------------------------------------------------

data "aws_subnet" "subnet" {
id = "${var.subnet_ids[count.index]}"

# Don't try to extract information about AZs in case they are explicitly specified (for backward compatibility).
count = "${length(var.availability_zones) == 0 ? length(var.subnet_ids) : 0}"
}

# ---------------------------------------------------------------------------------------------------------------------
# CREATE THE ELB
# ---------------------------------------------------------------------------------------------------------------------
Expand All @@ -31,8 +20,7 @@ resource "aws_elb" "vault" {
connection_draining_timeout = "${var.connection_draining_timeout}"

security_groups = ["${aws_security_group.vault.id}"]
# This split-join hack is a workaround for 'conditional operator cannot be used with list values' typecheck error.
availability_zones = ["${split(",", length(var.availability_zones) == 0 ? join(",", data.aws_subnet.subnet.*.availability_zone) : join(",", var.availability_zones))}"]
availability_zones = ["${var.availability_zones}"]
subnets = ["${var.subnet_ids}"]

# Run the ELB in TCP passthrough mode
Expand Down

0 comments on commit 9f7f835

Please sign in to comment.