I have a simple terraform code to create eip.This works fine.
resource "aws_eip" "envoy" {
count = length(var.subnet_cidr_public)
vpc = true
tags = "${merge(map("Name","envoyadmin-${count.index}"),var.tags)}"
}
output "envoy_eip" {
description = "Elastic ip address for Envoy nlb services"
value = aws_eip.envoy.*.allocation_id
}
The problem I have is with the terraform output.Eventhough the eips are created in AWS account, the allocation_ids are shown as null in terraform output. What could be the issue with this and how to fix it?
terraform output
envoy_eip = [
null,
null,
null,
]