This repository was archived by the owner on Jul 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ variable "ssl_certificate_id" {
5757 */
5858
5959resource "aws_elb" "main_with_ssl" {
60- count = " ${ 1 - ( var. ssl_certificate_id == " " ) } "
60+ count = " ${ var . ssl_certificate_id != " " ? 1 : 0 } "
6161
6262 name = " ${ var . name } "
6363
@@ -105,7 +105,7 @@ resource "aws_elb" "main_with_ssl" {
105105}
106106
107107resource "aws_elb" "main_without_ssl" {
108- count = " ${ 0 + ( var. ssl_certificate_id == " " ) } "
108+ count = " ${ var . ssl_certificate_id == " " ? 1 : 0 } "
109109
110110 name = " ${ var . name } "
111111
@@ -152,7 +152,7 @@ locals {
152152}
153153
154154resource "aws_route53_record" "external" {
155- count = " ${ 1 - ( var. external_zone_id == " " ) } "
155+ count = " ${ var . external_zone_id != " " ? 1 : 0 } "
156156
157157 zone_id = " ${ var . external_zone_id } "
158158 name = " ${ var . external_dns_name } "
@@ -198,7 +198,7 @@ output "dns" {
198198
199199// FQDN built using the zone domain and name (external)
200200output "external_fqdn" {
201- value = " ${ aws_route53_record . external . fqdn } "
201+ value = " ${ var . external_zone_id != " " ? element ( aws_route53_record. external . * . fqdn , 0 ) : " " } "
202202}
203203
204204// FQDN built using the zone domain and name (internal)
You can’t perform that action at this time.
0 commit comments