diff --git a/terraform/outputs.tf b/terraform/outputs.tf index f11c9c8..7767ea6 100644 --- a/terraform/outputs.tf +++ b/terraform/outputs.tf @@ -3,7 +3,7 @@ output "instance_id" { value = aws_instance.social.id } output "public_ip" { - value = aws_instance.social.public_ip + value = aws_eip.social.public_ip } output "nameservers" { #value = length(module.zone) == 0 ? "" : module.zone.0.route53_zone_name_servers diff --git a/terraform/route53.tf b/terraform/route53.tf index e609610..4e204b8 100644 --- a/terraform/route53.tf +++ b/terraform/route53.tf @@ -23,11 +23,11 @@ module "records" { name = "" type = "A" ttl = 600 # 10 minutes - records = [ aws_instance.social.public_ip ] + records = [ aws_eip.social.public_ip ] }, ] - depends_on = [module.zone] + depends_on = [ module.zone ] }