From 81eea99bd9469d51ff374d7f468874819d324ab2 Mon Sep 17 00:00:00 2001 From: Mohamed ER-Radi Date: Mon, 6 May 2024 17:27:50 +0200 Subject: [PATCH] fix associating ec2 eip error --- terraform/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/main.tf b/terraform/main.tf index 24c92a93e..551a767ee 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -57,6 +57,7 @@ resource "aws_eip" "elastic-ip" { domain = "vpc" network_interface = aws_network_interface.web-server-nic.id associate_with_private_ip = aws_network_interface.web-server-nic.private_ip + depends_on = [ aws_instance.ec2-staging ] tags = { Name = "plm-staging-eip-br-X" }